WC_Product_Simple::add_to_cart_text()
Get the add to cart button text.
Method of the class: WC_Product_Simple{}
Hooks from the method
Return
String
.
Usage
$WC_Product_Simple = new WC_Product_Simple(); $WC_Product_Simple->add_to_cart_text();
WC_Product_Simple::add_to_cart_text() WC Product Simple::add to cart text code WC 9.4.2
public function add_to_cart_text() { $text = $this->is_purchasable() && $this->is_in_stock() ? __( 'Add to cart', 'woocommerce' ) : __( 'Read more', 'woocommerce' ); return apply_filters( 'woocommerce_product_add_to_cart_text', $text, $this ); }