Change ‘Add to cart’ text to custom on button – WooCommerce


add_filter( 'woocommerce_product_add_to_cart_text' , 'custom_woocommerce_product_add_to_cart_text' );


function custom_woocommerce_product_add_to_cart_text() {


global $product;


$product_type = $product->product_type;
switch ( $product_type )

{
case 'external':
return __( 'More', 'woocommerce' );
break;
case 'grouped':
return __( 'More', 'woocommerce' );
break;
case 'simple':
return __( 'More', 'woocommerce' );
break;
case 'variable':
return __( 'More', 'woocommerce' );
break;
default:
return __( 'More', 'woocommerce' ); }
}

Advertisements
Change ‘Add to cart’ text to custom on button – WooCommerce

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s