diff --git a/includes/wc-product-functions.php b/includes/wc-product-functions.php index 62eb7e5bcae..df207cdbd9b 100644 --- a/includes/wc-product-functions.php +++ b/includes/wc-product-functions.php @@ -484,7 +484,7 @@ function wc_track_product_view() { $viewed_products = (array) explode( '|', $_COOKIE['woocommerce_recently_viewed'] ); } - // Unset if already in viewed products list and append ID. + // Unset if already in viewed products list. $keys = array_flip( $viewed_products ); if ( isset( $keys[ $post->ID ] ) ) { unset( $viewed_products[ $keys[ $post->ID ] ] ); diff --git a/includes/widgets/class-wc-widget-recently-viewed.php b/includes/widgets/class-wc-widget-recently-viewed.php index df8f5b53840..bd525807141 100644 --- a/includes/widgets/class-wc-widget-recently-viewed.php +++ b/includes/widgets/class-wc-widget-recently-viewed.php @@ -33,7 +33,7 @@ class WC_Widget_Recently_Viewed extends WC_Widget { 'type' => 'number', 'step' => 1, 'min' => 1, - 'max' => '', + 'max' => 15, 'std' => 10, 'label' => __( 'Number of products to show', 'woocommerce' ), ),