woocommerce_product_add_to_cart_text хук-фильтрWC 1.0

Get the add to cart button text.

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

add_filter( 'woocommerce_product_add_to_cart_text', 'wp_kama_woocommerce_product_add_to_cart_text_filter', 10, 2 );
function wp_kama_woocommerce_product_add_to_cart_text_filter( $this->get_button_text(), $that ){
	// filter...

	return $this->get_button_text();
}
$this->get_button_text()
-
$that
-

Где вызывается хук

WC_Product_External::add_to_cart_text()
woocommerce_product_add_to_cart_text
WC_Product_Simple::add_to_cart_text()
woocommerce_product_add_to_cart_text
WC_Product::add_to_cart_text()
woocommerce_product_add_to_cart_text
WC_Product_Grouped::add_to_cart_text()
woocommerce_product_add_to_cart_text
WC_Product_Variable::add_to_cart_text()
woocommerce_product_add_to_cart_text
woocommerce/includes/class-wc-product-external.php 181
return apply_filters( 'woocommerce_product_add_to_cart_text', $this->get_button_text() ? $this->get_button_text() : _x( 'Buy product', 'placeholder', 'woocommerce' ), $this );
woocommerce/includes/class-wc-product-simple.php 62
return apply_filters( 'woocommerce_product_add_to_cart_text', $text, $this );
woocommerce/includes/abstracts/abstract-wc-product.php 1896
return apply_filters( 'woocommerce_product_add_to_cart_text', __( 'Read more', 'woocommerce' ), $this );
woocommerce/includes/class-wc-product-grouped.php 42
return apply_filters( 'woocommerce_product_add_to_cart_text', __( 'View products', 'woocommerce' ), $this );
woocommerce/includes/class-wc-product-variable.php 60
return apply_filters( 'woocommerce_product_add_to_cart_text', $this->is_purchasable() ? __( 'Select options', 'woocommerce' ) : __( 'Read more', 'woocommerce' ), $this );

Где используется хук в WooCommerce

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