Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit cc6cd6c

Browse files
author
Matt Allan
authored
Fixes a fatal error in 8.0.0 caused by passing the incorrect amount of args to woocommerce_cart_item_name filter (#784)
* Revert "Load HTML in product name on shipping rates" This reverts commit 50e324e. * Add changelog entry * Update changelog.txt
1 parent 55075b5 commit cc6cd6c

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
*** WooCommerce Subscriptions Core Changelog ***
22

3+
= 8.0.1 - 2025-xx-xx =
4+
* Fix - Revert a change released in 7.2.0 which triggered the "woocommerce_cart_item_name" filter with the wrong number of parameters.
5+
36
= 8.0.0 - 2025-02-13 =
47
* Fix - Recommend WooPayments when there is no available payment gateway.
58
* Fix - Safeguards added to the Subscriptions Totals template used in the My Account area, to guard against fatal errors that could arise in unusual conditions.

includes/wcs-cart-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function wcs_cart_totals_shipping_html() {
108108
<?php wcs_cart_print_shipping_input( $recurring_cart_package_key, $shipping_method ); ?>
109109
<?php do_action( 'woocommerce_after_shipping_rate', $shipping_method, $recurring_cart_package_key ); ?>
110110
<?php if ( ! empty( $show_package_details ) ) : ?>
111-
<?php echo '<p class="woocommerce-shipping-contents"><small>' . wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $package_details ) ) . '</small></p>'; ?>
111+
<?php echo '<p class="woocommerce-shipping-contents"><small>' . esc_html( $package_details ) . '</small></p>'; ?>
112112
<?php endif; ?>
113113
<?php if ( $recurring_rates_match_initial_rates ) : ?>
114114
<?php wcs_cart_print_inherit_shipping_flag( $recurring_cart_package_key ); ?>

templates/cart/cart-recurring-shipping.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<?php endif; ?>
3636

3737
<?php if ( $show_package_details ) : ?>
38-
<?php echo '<p class="woocommerce-shipping-contents"><small>' . wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $package_details ) ) . '</small></p>'; ?>
38+
<?php echo '<p class="woocommerce-shipping-contents"><small>' . esc_html( $package_details ) . '</small></p>'; ?>
3939
<?php endif; ?>
4040
</td>
4141
</tr>

0 commit comments

Comments
 (0)