Skip to content

Instantly share code, notes, and snippets.

@fervous
Created March 2, 2018 03:27
Show Gist options
  • Save fervous/b62be63552b52a082938694bc01d35d5 to your computer and use it in GitHub Desktop.
Save fervous/b62be63552b52a082938694bc01d35d5 to your computer and use it in GitHub Desktop.
Change Variations and Atrributes to Options and Price Options WC Vendors Pro
/* attribute(s) to option(s) */
add_filter( 'gettext', 'wcv_translate_attributes', 999 );
function wcv_translate_attributes( $translated ) {
$translated = str_ireplace( 'attributes', 'Options', $translated );
return $translated;
}
add_filter( 'gettext', 'wcv_translate_attribute', 999 );
function wcv_translate_attribute( $translated ) {
$translated = str_ireplace( 'attribute', 'Option', $translated );
return $translated;
}
/* variation(s) to price option(s) */
add_filter( 'gettext', 'wcv_translate_variation', 999 );
function wcv_translate_variation( $translated ) {
$translated = str_ireplace( 'variation', 'Price Option', $translated );
return $translated;
}
add_filter( 'gettext', 'wcv_translate_variations', 999 );
function wcv_translate_variations( $translated ) {
$translated = str_ireplace( 'variations', 'Price Options', $translated );
return $translated;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment