Merge pull request #14210 from woocommerce/fix/14181

Update add_to_cart_text for external products to include default
This commit is contained in:
Claudio Sanches 2017-04-10 14:04:35 -03:00 committed by GitHub
commit 81ab0b766e
1 changed files with 1 additions and 1 deletions

View File

@ -177,6 +177,6 @@ class WC_Product_External extends WC_Product {
* @return string
*/
public function add_to_cart_text() {
return apply_filters( 'woocommerce_product_add_to_cart_text', $this->get_button_text(), $this );
return apply_filters( 'woocommerce_product_add_to_cart_text', $this->get_button_text() ? $this->get_button_text() : _x( 'Buy product', 'placeholder', 'woocommerce' ), $this );
}
}