• Resolved guardiano78

    (@guardiano78)


    Hello,

    I updated woocommerce to the latest version 8.6.1 but I realized that the following code no longer works:

    add_filter(‘pre_option_woocommerce_tax_display_shop’, ‘override_tax_display_setting’);
    add_filter(‘pre_option_woocommerce_tax_display_cart’, ‘override_tax_display_setting’);
    function override_tax_display_setting() {
    if ( current_user_can(‘friends’) ) {
    return “incl”;
    } else {
    return “excl”;
    }
    }

    Does anyone know why and what I can do to solve the problem? Thank you.

    Regards.

Viewing 1 replies (of 1 total)
  • Thread Starter guardiano78

    (@guardiano78)

    Hello,

    I solved the problem.
    The registered user, I don’t know why, did not have the NATION field filled in. This prevented woocommerce from performing the tax calculation, or at least in visualization. Thanks anyway.

Viewing 1 replies (of 1 total)
  • The topic ‘display prices include tax by role’ is closed to new replies.