שינוי טקסט "בחר אפשרויות" במוצרים עם וריאציות

PHOTO EMBED

Tue May 18 2021 20:01:30 GMT+0000 (Coordinated Universal Time)

Saved by @Shesek

dd_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->get_type();		switch ( $product_type ) {		case 'external':			return _( 'Buy product', 'woocommerce' );		break;		case 'grouped':			return _( 'View products', 'woocommerce' );		break;		case 'simple':			return _( 'Add to cart', 'woocommerce' );		break;		case 'variable':			return _( 'Select options', 'woocommerce' );		break;		default:			return __( 'Read more', 'woocommerce' );	}	}
content_copyCOPY