2016-03-28 20 views

Antwort

3

Verwenden Sie bedingte Logik. In diesem Fall ist die Funktion has_term()

add_filter('woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text'); // 2.1 + 

function woo_custom_cart_button_text($text) { 
    if(has_term('your-special-category', 'product_cat')){ 
     $text = __('My Button Text', 'your-plugin'); 
    } 
    return $text; 
} 
Verwandte Themen