Use placeholder value from backend if not set
This commit is contained in:
parent
b059851882
commit
0348a4751e
|
@ -167,7 +167,7 @@ class WC_Product_External extends WC_Product {
|
|||
* @return string
|
||||
*/
|
||||
public function single_add_to_cart_text() {
|
||||
return apply_filters( 'woocommerce_product_single_add_to_cart_text', $this->get_button_text(), $this );
|
||||
return apply_filters( 'woocommerce_product_single_add_to_cart_text', $this->get_button_text() ? $this->get_button_text() : _x( 'Buy product', 'placeholder', 'woocommerce' ), $this );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue