Forked from woogist/wc-measurement-price-calculator-custom-unit.php
Last active
August 29, 2015 14:07
-
-
Save tamarazuk/32dd99e66aad8eabc7aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/** | |
* This adds the new unit to the WooCommerce admin | |
*/ | |
function add_woocommerce_dimension_unit_league( $settings ) { | |
foreach ( $settings as &$setting ) { | |
if ( 'woocommerce_dimension_unit' == $setting['id'] ) { | |
$setting['options']['league'] = __( 'League' ); // new unit | |
} | |
} | |
return $settings; | |
} | |
add_filter( 'woocommerce_product_settings', 'add_woocommerce_dimension_unit_league' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Its not working for me. can you explain the code?