Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tamarazuk/fbac05cb34225a543e5e to your computer and use it in GitHub Desktop.
Save tamarazuk/fbac05cb34225a543e5e to your computer and use it in GitHub Desktop.
WooCommerce Measurement Price Calculator - Translate labels
<?php // only copy this line if needed
function sv_mpc_measurement_label( $label ) {
if ( 'fr_FR' === get_locale() ) {
$label = str_replace( 'Required Width', 'Largeur requise', $label );
$label = str_replace( 'Width', 'Largeur', $label );
}
return $label;
}
add_filter( 'wc_measurement_price_calculator_label', 'sv_mpc_measurement_label' );
add_filter( 'wc_measurement_price_calculator_unit_label', 'sv_mpc_measurement_label' );
@yosoychicho
Copy link

Same problem

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