Skip to content

Commit

Permalink
Fixes a fatal error in 8.0.0 caused by passing the incorrect amount o…
Browse files Browse the repository at this point in the history
…f 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
  • Loading branch information
mattallan authored Feb 13, 2025
1 parent 55075b5 commit cc6cd6c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*** WooCommerce Subscriptions Core Changelog ***

= 8.0.1 - 2025-xx-xx =
* Fix - Revert a change released in 7.2.0 which triggered the "woocommerce_cart_item_name" filter with the wrong number of parameters.

= 8.0.0 - 2025-02-13 =
* Fix - Recommend WooPayments when there is no available payment gateway.
* 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.
Expand Down
2 changes: 1 addition & 1 deletion includes/wcs-cart-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function wcs_cart_totals_shipping_html() {
<?php wcs_cart_print_shipping_input( $recurring_cart_package_key, $shipping_method ); ?>
<?php do_action( 'woocommerce_after_shipping_rate', $shipping_method, $recurring_cart_package_key ); ?>
<?php if ( ! empty( $show_package_details ) ) : ?>
<?php echo '<p class="woocommerce-shipping-contents"><small>' . wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $package_details ) ) . '</small></p>'; ?>
<?php echo '<p class="woocommerce-shipping-contents"><small>' . esc_html( $package_details ) . '</small></p>'; ?>
<?php endif; ?>
<?php if ( $recurring_rates_match_initial_rates ) : ?>
<?php wcs_cart_print_inherit_shipping_flag( $recurring_cart_package_key ); ?>
Expand Down
2 changes: 1 addition & 1 deletion templates/cart/cart-recurring-shipping.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<?php endif; ?>

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

0 comments on commit cc6cd6c

Please sign in to comment.