Is this plugin compatible with Price Based on Country for WooCommerce plugin?

Forums Order Minimum/Maximum Amount for WooCommerce Is this plugin compatible with Price Based on Country for WooCommerce plugin?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #93158
    Pablo
    Moderator
    Plugin Support

    Thanks 🙂

    You could try to update totals if the country/region field changes. It’s supposed to do that by default but maybe there could be something disabling it. This is the code you’d need to do that:

    add_filter( 'woocommerce_checkout_fields', function ( $fields_sections ) {
       $fields_sections['billing']['billing_country']['class'][] = 'update_totals_on_change';
       return $fields_sections;
    }, PHP_INT_MAX );
    

    Anyway, the “Force refresh” option is using the woocommerce_review_order_after_order_total' hook and I just tested it here and it worked. I mean, when the country changes, the notice is refreshed.

    Maybe if it’s possible for you to test another hook as 'woocommerce_review_order_before_submit' you could have more luck.

    I’ll add a new option for you on the next version allowing to choose the hook.

    #93159
    Pablo
    Moderator
    Plugin Support

    Hi again Martin,

    I created an option for you on version 4.1.2 I just released.
    Now it will be possible to choose the hook used on the “Force refresh” option. You can find it right below the “Force refresh” option.

    And I’m also adding the 'update_totals_on_change' class to some country and address fields.

    I hope it helps 😉

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.