Skip to content

Instantly share code, notes, and snippets.

@RiodeJaneiroo
Created July 31, 2019 07:51
Show Gist options
  • Save RiodeJaneiroo/38783439dd48351b5578777bab1bc961 to your computer and use it in GitHub Desktop.
Save RiodeJaneiroo/38783439dd48351b5578777bab1bc961 to your computer and use it in GitHub Desktop.
[Изменить текст опции товара] #wc #wocommerce #wordpress
<?php
add_filter('woocommerce_dropdown_variation_attribute_options_args', 'my_change_choose_an_option_text_func', 10, 2);
function my_change_choose_an_option_text_func($args){
if($args['attribute'] == 'pa_tsvet') {
$args['show_option_none'] = 'Выбрать цвет';
}
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment