Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WooCommerce Measurement Price Calculator custom unit normalize
add_filter( 'wc_measurement_price_calculator_normalize_table', 'wc_measurement_price_calculator_normalize_table' );
* Add conversions for any custom units to the appropriate standard unit
function wc_measurement_price_calculator_normalize_table( $normalize_table ) {
// 1 league = 18,228.3465 ft
$normalize_table['league'] = array( 'factor' => 18228.3465, 'unit' => 'ft' );
return $normalize_table;

This comment has been minimized.

Copy link

@matteoraggi matteoraggi commented Feb 12, 2016

In which folder of woocommerce 2.5.2 or of the plugin woocommerce-measurement-price-calculator I should insert the file wc-measurement-price-calculator-unit-normalize.php ?


This comment has been minimized.

Copy link

@onebook0505 onebook0505 commented Apr 3, 2019

Hi @bekarice,why woocommerce_area_unit is not working?

in measurement tab, if not enabled Calculated Price,how can i show the product dimensions in the cart?

WooCommerce version 3.5.7
WooCommerce Measurement Price Calculator version 3.14.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment