Use placeholder value from backend if not set

This commit is contained in:
Mike Jolley 2017-04-06 18:19:07 +01:00
parent b059851882
commit 0348a4751e
1 changed files with 1 additions and 1 deletions

View File

@ -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 );
}
/**