Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xlplugins/88751f982d77331913d0485cc432a662 to your computer and use it in GitHub Desktop.
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
<?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