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:

functions.php
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.

  1. PiWeb Disable payment method / Partial payment for WooCommerce icon PiWeb Disable payment method / Partial payment for WooCommerce4,000+ installs apply_filters( 'wmc_change_raw_price', $price ) includes/class-common-cart.php:93
  2. PI Advanced Flat rate / Conditional shipping for WooCommerce icon PI Advanced Flat rate / Conditional shipping for WooCommerce2,000+ installs apply_filters( 'wmc_change_raw_price', $price ) includes/common.php:86
  3. PI Conditional cart fee / Extra charge rule for WooCommerce icon PI Conditional cart fee / Extra charge rule for WooCommerce2,000+ installs apply_filters( 'wmc_change_raw_price', $price ) includes/class-common-cart.php:133
  4. Lucky Wheel for WooCommerce icon Lucky Wheel for WooCommerce1,000+ installs apply_filters( 'wmc_change_raw_price', $price ) plugins/curcy.php:125
  5. Pickup Custom Options for Woocommerce icon 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.