• Resolved robert_k

    (@robert_k)


    When the plugin outputs the most recently viewed products, the _hidden meta field isn’t accounted for. So products hidden from the catalog are selected. However, as part of the loop hidden products aren’t displayed. So, if your most recently viewed products were hidden it looks like the area is broken. Because have_posts() is true the area displays, but because some of the products may be hidden the products may all be hidden.

    This probably affects both shortcodes.

    The fix is pretty simple (but must be applied to both front-end/back-end implementations:

    			$args['meta_query'][] = [
    				'key'     => '_visibility',
    				'value'   => 'hidden',
    				'compare' => '!=',
    			];
    

    Also, the sorting should be updated for WP 4+, as it seems to be inaccurate/deprecated:

    
    'meta_key'    => 'recent_view_time',
    'meta_type'   => 'DATETIME',
    'orderby'     => 'meta_value',
    'order'       => 'DESC',
    
Viewing 1 replies (of 1 total)
  • Plugin Author cedcommerce

    (@cedcommerce)

    Hello Robert,

    Thank you for using our plugin, we appreciate you for finding out some modifications in our plugin, And we will be soon implement all of your suggestion in the next release.

    Thanks And Regards
    CedCommerce

Viewing 1 replies (of 1 total)
  • The topic ‘[bug] Doesn’t account for catalog visibility’ is closed to new replies.