• Resolved df7729

    (@df7729)


    Hi,

    Unless you add pricing tiers I’m going to have to use “aelia Currency Switcher” because “WooCommerce Tiered Price Table” has a patch for it at https://gist.github.com/mynewvk/00d7e4e34bb9afd16d2b21b406c410ec

    It doesn’t support fixed pricing like I want but can just adjust the fixed exchange rate to get the price I want (I setup excel spreadsheet to calculate it).

    Just want to see if you will have pricing tiers before finalizing decision.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Oscar Gare

    (@oscargare)

    The following code should works:

    add_action( 'tier_pricing_table/price/product_price_rules', function ( $rules, $product_id, $type ) {
            
           if ( ! wcpbc_the_zone() ) {
                   return $rules;
           }
    	
    	if ( $type === 'fixed' ) {
    		$_rules = [];
    
    		foreach ( $rules as $quantity => $price ) {
    			$_rules[ $quantity ] = wcpbc_the_zone()->get_exchange_rate_price( $price );
    		}
    
    		return $_rules;
    	}
    
    	return $rules;
    
    }, 99, 4 );

    @bycrik: Could you include this snippet in your gist account? Thanks

    Hello @oscargare,

    Thanks for the snippet!

    Sure, will do so.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘pricing tiers’ is closed to new replies.