Filter/hook for changing prices
-
Hello and thank you for this useful plugin.
I have the following scenario:
For some countries, a second price for B2B cases was needed.
A B2B customer user role is created for B2B changes throughout the eshopHowever in the pricing zone of Price Based on Country you cannot create a zone with countries already used which makes sense.
Thus, I added the B2B cases as extra countries, i.e.
add_filter( 'woocommerce_countries', 'add_b2b_countries' ); function add_b2b_countries( $countries ) { $new_countries = array( 'IT_B2B' => __( 'Italy - B2B', 'woocommerce' ), // ..... ); return array_merge( $countries, $new_countries ); }
Obviously these countries do not have any geolocation.
Is there any filter/hook where one could change the country before the price is selected? Or just change the price?
So that I could simply check something like:if ( wc_current_user_has_role( 'b2b_customer' ) ) { // select a different pricing zone // or or something similar }
Thank you in advance!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Filter/hook for changing prices’ is closed to new replies.