WC_Product_Simple::add_to_cart_text()publicWC 1.0

Get the add to cart button text.

Метод класса: WC_Product_Simple{}

Хуки из метода

Возвращает

Строку.

Использование

$WC_Product_Simple = new WC_Product_Simple();
$WC_Product_Simple->add_to_cart_text();

Код WC_Product_Simple::add_to_cart_text() WC 8.7.0

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 );
}