I\'m running WooCommerce version 2.5.5. The following lines of code don\'t seem to change the Add To Cart button text on my product page for an item with variations:
<
The correct filter for the single product page is woocommerce_product_single_add_to_cart_text.
function my_custom_cart_button_text( $text, $product ) {
if( $product->is_type( 'variable' ) ){
$text = __('Buy Now', 'woocommerce');
}
return $text;
}
add_filter( 'woocommerce_product_single_add_to_cart_text', 'my_custom_cart_button_text', 10, 2 );