change ‘select options’ to ‘more info’ php

You are here:
< Back

//
// CHANGE ‘SELECT OPTIONS’ TEXT
//

add_filter( ‘woocommerce_product_add_to_cart_text’ , ‘custom_woocommerce_product_add_to_cart_text’ );
/**
* custom_woocommerce_template_loop_add_to_cart
*/
function custom_woocommerce_product_add_to_cart_text() {
global $product;

$product_type = $product->product_type;

switch ( $product_type ) {
case ‘external’:
return __( ‘Buy product’, ‘woocommerce’ );
break;
case ‘grouped’:
return __( ‘View products’, ‘woocommerce’ );
break;
case ‘simple’:
return __( ‘more info’, ‘woocommerce’ );
break;
case ‘variable’:
return __( ‘more info’, ‘woocommerce’ );
break;
default:
return __( ‘Read more’, ‘woocommerce’ );
}

}

zeilermedia logo

Get $20 USD of store credit PLUS 20% off your first license when you register for a free account

Claim Now

 

 

Dismiss

TOP
0

Your Cart