diff --git a/includes/class-wc-shortcodes.php b/includes/class-wc-shortcodes.php index f9b39f340ea..3778d45306e 100644 --- a/includes/class-wc-shortcodes.php +++ b/includes/class-wc-shortcodes.php @@ -821,6 +821,9 @@ class WC_Shortcodes { ob_start(); + // Rename arg + $atts['posts_per_page'] = absint( $atts['per_page'] ); + woocommerce_related_products( $atts ); return ob_get_clean();