From 3e91243b705444446ddcbaf921f60e469b208873 Mon Sep 17 00:00:00 2001 From: kkmuffme <11071985+kkmuffme@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:45:42 +0100 Subject: [PATCH] fix https://github.com/woocommerce/woocommerce/issues/51548 (#51549) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: github-actions Co-authored-by: NĂ©stor Soriano --- .../changelog/51549-fix-wrong-default-param-type-51548 | 5 +++++ plugins/woocommerce/includes/wc-template-functions.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 plugins/woocommerce/changelog/51549-fix-wrong-default-param-type-51548 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 ) {