Last active
April 3, 2019 08:42
-
-
Save woogist/6380158 to your computer and use it in GitHub Desktop.
WooCommerce Measurement Price Calculator custom unit normalize
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( '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; | |
} |
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
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 ?