diff --git a/plugins/woocommerce/changelog/51549-fix-wrong-default-param-type-51548 b/plugins/woocommerce/changelog/51549-fix-wrong-default-param-type-51548 new file mode 100644 index 00000000000..2bd3dbf42ae --- /dev/null +++ b/plugins/woocommerce/changelog/51549-fix-wrong-default-param-type-51548 @@ -0,0 +1,5 @@ +Significance: patch +Type: tweak + +Comment: Fix: woocommerce_upsell_display was receiving a string instead of an integer in $limit + diff --git a/plugins/woocommerce/includes/wc-template-functions.php b/plugins/woocommerce/includes/wc-template-functions.php index 18b2da33901..27fee85a766 100644 --- a/plugins/woocommerce/includes/wc-template-functions.php +++ b/plugins/woocommerce/includes/wc-template-functions.php @@ -2200,7 +2200,7 @@ if ( ! function_exists( 'woocommerce_upsell_display' ) ) { * @param string $orderby Supported values - rand, title, ID, date, modified, menu_order, price. * @param string $order Sort direction. */ - function woocommerce_upsell_display( $limit = '-1', $columns = 4, $orderby = 'rand', $order = 'desc' ) { + function woocommerce_upsell_display( $limit = -1, $columns = 4, $orderby = 'rand', $order = 'desc' ) { global $product; if ( ! $product ) {