WordPress filter hook
wmc_change_raw_price
Fired by 5 WordPress plugins, running on 9,000+ sites between them.
“for doing currency conversion of fees for multiple currency plugin https://wordpress.org/plugins/woo-multi-currency/”
How to use wmc_change_raw_price
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'wmc_change_raw_price', function( $price ) {
// Change $price here.
return $price;
}, 10, 1 );Argument names come from PiWeb Disable payment method / Partial payment for WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
5 plugins that fire wmc_change_raw_price
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
PiWeb Disable payment method / Partial payment for WooCommerce4,000+ installs
apply_filters( 'wmc_change_raw_price', $price )includes/class-common-cart.php:93 -
PI Advanced Flat rate / Conditional shipping for WooCommerce2,000+ installs
apply_filters( 'wmc_change_raw_price', $price )includes/common.php:86 -
PI Conditional cart fee / Extra charge rule for WooCommerce2,000+ installs
apply_filters( 'wmc_change_raw_price', $price )includes/class-common-cart.php:133 -
Lucky Wheel for WooCommerce1,000+ installs
apply_filters( 'wmc_change_raw_price', $price )plugins/curcy.php:125 -
Pickup Custom Options for WoocommerceFewer than 10 installs
apply_filters( 'wmc_change_raw_price', 1 )pickup-custom-options.php:51
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.