Created
July 6, 2020 11:00
-
-
Save xlplugins/88751f982d77331913d0485cc432a662 to your computer and use it in GitHub Desktop.
Price Based on Country for WooCommerce https://wordpress.org/plugins/woocommerce-product-price-based-on-countries/ #switcher #currency #order bump #aero
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'wfob_product_raw_data', function ( $raw_data, $product ) { | |
/** | |
* @var $product WC_Product | |
*/ | |
$raw_data['regular_price'] = $product->get_regular_price(); | |
$raw_data['price'] = $product->get_price(); | |
return $raw_data; | |
}, 10, 2 ); | |
add_filter( 'wfacp_product_raw_data', function ( $raw_data, $product ) { | |
/** | |
* @var $product WC_Product | |
*/ | |
$raw_data['regular_price'] = $product->get_regular_price(); | |
$raw_data['price'] = $product->get_price(); | |
return $raw_data; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment