• Resolved Howdy_McGee

    (@howdy_mcgee)


    I could not get this to work with WooCommerce Product Categories. I thought maybe because the sorting was not set to ‘menu_order’ but even setting that in pre_get_posts didn’t seem to change anything.

    /**
     * Front-end Query Modifications
     * 
     * @param WP_Query $query
     * 
     * @return void
     */
    function prefix_pgp( $query ) {
    	
    	if( is_admin() ) {
    		return;
    	}
    	
    	if( $query->is_main_query() ) {
    		
    		// Custom Product Order
    		if( $query->is_post_type_archive( 'product' ) || $query->is_tax( 'product_cat' ) && empty( $_GET['orderby'] ) ) {
    			$query->set( 'orderby', array( 'menu_order' => 'ASC', 'post_date' => 'ASC' ) );
    		}
    		
    	}
    	
    }
    add_action( 'pre_get_posts', 'prefix_pgp' );
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    Indeed, there is an issue with WooCommerce saving ranking orders in the admin page.

    I am aware of this issue and will be relesing a fix.

    In the mean time, please downgrade to vs 1.8.1 of this plugin, I believe it works with WooCommerce

    Plugin Author Aurovrata Venet

    (@aurovrata)

    I have released a fix for woocommerce in the GitHub repo.  You can download v2.4.3 here and test it on your site.  I’d appreciate if you could help me test this version before I release it in the official WordPress repo.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    I am assuming this issue is now resolved since I have not heard back from you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Issues with WooCommerce’ is closed to new replies.