• Resolved nacm

    (@nacm)


    Hi, I have custom taxonomy brands and its not filtering any new product that I added after updating to Woocommerce 3. Any suggestion?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello

    Try to clear all cache. drop me exact link to the issue

    Thread Starter nacm

    (@nacm)

    Thanks for the reply, here is the live link. There are few new products I have added after updating Woocommerce to 3. (JM Monster Game PE5N Gold, JM Monster Game PE4 Gold, JM Powerspell PE4 CL: RD/GD and few more). They all belong to brand “Jigging Master”, product type “Overhead”. They don’t add to the count too. If you filter by brand (a custom taxonomy) or product type (a sub product category) it doesn’t show those products added after the update. But they show up when using the price range slider.

    Thanks

    Thread Starter nacm

    (@nacm)

    Hi again. I have narrowed down the issue to “Listen catalog visibility”. it works when its set to false. As you know in woocommerce 3. is has changed visibility from meta_query to tax_query..

    I hope this is helpful when you update the plugin in the future. Do you have any quick fix for this issue. Which function/s should I change?

    Thanks

    Hello

    Thank you for cooperation! ??

    Fix:
    in file \woocommerce-products-filter\index.php

    1) in function parse_query remove/comment this line:
    $meta_query = $this->listen_catalog_visibility($meta_query, true);
    and add this code( https://c2n.me/3JnyL7C.png ):
    $tax_query=$this->listen_catalog_visibility($tax_query, true);

    2) in function dynamic_count change code(name of array) – https://c2n.me/3Jnz7Tw.png

    3) in function get_meta_query remove/comment this line – https://c2n.me/3Jnzo7f.png

    4) in function woof_products add this code( https://c2n.me/3JnzPqc.png ) and change 1 variable in array $args

        // fix visibility    
            $tax_query= $this->get_tax_query($taxonomies);
            $tax_query= $this->listen_catalog_visibility($tax_query);

    Please do test.

    Thread Starter nacm

    (@nacm)

    Thanks, It works but has to change the tax query parameters as follows for 2nd step.
    `$args[‘tax_query’][] = array(
    ‘taxonomy’ => ‘product_visibility’,
    ‘field’ => ‘name’,
    ‘terms’ => ‘exclude-from-catalog’,
    ‘operator’ => ‘NOT IN’,
    );`

    Thank you very much

    Hello

    Oh! Yes, thank you. You are right. My bad. ( I hurried ?? )

    Updated the WooCommerce version today to 3.0.2 and after that this plugin is throwing session_start(): Failed to initialize storage module: user (path: ) in wp-content/plugins/woocommerce-products-filter/classes/storage.php:26. The plugin was fine until the update of WooCommerce plugin. I’m using pantheon.io for hosting and already activated ‘wp-native-php-sessions’ plugin.

    Here’s the call-stack:

    CALL STACK
    #	Function	Location
    1	session_start()	/wp-content/plugins/woocommerce-products-filter/classes/storage.php:26
    2	WOOF_STORAGE->__construct(session)	/wp-content/plugins/woocommerce-products-filter/index.php:108
    3	WOOF->__construct()	/wp-content/plugins/woocommerce-products-filter/index.php:2913
    4	unknown()	/wp-settings.php:304
    5	unknown()	/wp-config.php:161
    6	unknown()	/wp-load.php:37
    7	unknown()	/wp-admin/admin-ajax.php:22

    Hello

    Now I use WooCommerce 3.0.2 and WOOF 2.1.6.1 ( 1.1.6.1 ) – all works fine

    Fix for you – in file \wp-content\plugins\woocommerce-products-filter\index.php

    Change session to transient – https://c2n.me/3Jwhpww.png

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Not working with Woocommerce 3’ is closed to new replies.