• Resolved mattiaspkallio

    (@mattiaspkallio)


    Hi!

    I’m not sure if I’m just doing something wrong or haven’t found the right checkbox.

    My problem is that the tax toggle function works everywhere but the cart-page. I have tried to disable all other plugins and change to a WordPress-theme and it still only show without tax (as selected in the Woocommerce settings).

    I sort of hacked the class-wcj-tax-display.php file and added the “option_woocommerce_tax_display_cart” hook to the “Tax Toggle” section too. And that seems to do the trick, but I’m assuming I should do it some other way? ??

    //Mattias

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support David G

    (@gravid7)

    Hi @mattiaspkallio ,

    Thanks for reaching out to us.

    If possible can you please share screenshots of your configuration settings and screenshots of your issue? So, we can check and help you.

    Thread Starter mattiaspkallio

    (@mattiaspkallio)

    Hi!

    I can’t seem to find a setting for that in the configuration other than activate the toggle button or not. There seems to be something under “By User Role”, but I’m not using that.

    But I’m pretty sure that unless you use “By User Role” the toggle button never works on the cart page? If you look in the class-wcj-tax-display.php on the other two cases the cart page is missing.

    Looks something like this, and I’m assuming the option_woocommerce_tax_display_cart should be on the other two too?

                    // Tax Incl./Excl. by product/category.
    
                    if ( 'yes' === wcj_get_option( 'wcj_product_listings_display_taxes_by_products_enabled', 'no' ) ) {
    
                        add_filter( 'option_woocommerce_tax_display_shop', array( $this, 'tax_display_by_product' ), PHP_INT_MAX );
    
                    }
    
                    // Tax Incl./Excl. by user role.
    
                    if ( 'yes' === wcj_get_option( 'wcj_product_listings_display_taxes_by_user_role_enabled', 'no' ) ) {
    
                        add_filter( 'option_woocommerce_tax_display_shop', array( $this, 'tax_display_by_user_role' ), PHP_INT_MAX );
    
                        add_filter( 'option_woocommerce_tax_display_cart', array( $this, 'tax_display_by_user_role' ), PHP_INT_MAX );
    
                    }
    
                    // Tax toggle.
    
                    if ( 'yes' === wcj_get_option( 'wcj_tax_display_toggle_enabled', 'no' ) ) {
    
                        add_action( 'init', array( $this, 'tax_display_toggle_param' ), PHP_INT_MAX );
    
                        add_filter( 'option_woocommerce_tax_display_shop', array( $this, 'tax_display_toggle' ), PHP_INT_MAX );
    
                    }

    Cheers
    //Mattias

    Plugin Support David G

    (@gravid7)

    Hi @mattiaspkallio ,

    It will work without the User Role option. Please try checking once by deactivating the cache plugin.

    Thread Starter mattiaspkallio

    (@mattiaspkallio)

    Hi!

    I still can’t get it to work for some reason…

    I have tried to disable all other plugins except Woocommerce and Booster and change to a standard WordPress theme and it still does not work. It allways shows the same price on the cart page. It works on all other pages like product and category pages.

    Just now I tried to use the tax toggle on a local installation of Woocommerce that is more or less empty except a couple of test products. Still does not work on the cart page.

    If I add the row:
    add_filter( ‘option_woocommerce_tax_display_cart’, array( $this, ‘tax_display_toggle’ ), PHP_INT_MAX );
    in the wcj-tax-display class, it does work, but since it will disappear with updates it’s not a great soultion. ??

    Sorry for being a hassle, but I just can’t get it to work. ??
    //Mattias

    Plugin Support David G

    (@gravid7)

    Hi @mattiaspkallio,

    I checked this module, I am not facing this kind of errors. So, If possible you can contact us from our website. So, we can take a deeper look and help you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Tax Toggle not working on cart-page’ is closed to new replies.