Skip to content

Instantly share code, notes, and snippets.

@bekarice
Last active February 4, 2019 23:18
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Measurement Price Calculator Translate Labels
function sv_mpc_measurement_label( $label ) {
return apply_filters( 'translate_string', $label, 'woocommerce-measurement-price-calculator', $label);
}
add_filter( 'wc_measurement_price_calculator_label', 'sv_mpc_measurement_label' );
add_filter( 'wc_measurement_price_calculator_unit_label', 'sv_mpc_measurement_label' );
@binhwpo
Copy link

binhwpo commented Oct 23, 2015

Thanks for sharing this. Hover it broke the translation. The correct code should be:

return apply_filters('translate_string', $label, 'woocommerce-measurement-price-calculator', $label);

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