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

Get the add to cart button text for the single page.

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

add_filter( 'woocommerce_product_single_add_to_cart_text', 'wp_kama_woocommerce_product_single_add_to_cart_text_filter', 10, 2 );

/**
 * Function for `woocommerce_product_single_add_to_cart_text` filter-hook.
 * 
 * @param  $this->get_button_text() 
 * @param  $that                    
 *
 * @return 
 */
function wp_kama_woocommerce_product_single_add_to_cart_text_filter( $this->get_button_text(), $that ){

	// filter...
	return $this->get_button_text();
}
$this->get_button_text()
-
$that
-

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

WC_Product_External::single_add_to_cart_text()
woocommerce_product_single_add_to_cart_text
WC_Product::single_add_to_cart_text()
woocommerce_product_single_add_to_cart_text
woocommerce/includes/class-wc-product-external.php 171
return apply_filters( 'woocommerce_product_single_add_to_cart_text', $this->get_button_text() ? $this->get_button_text() : _x( 'Buy product', 'placeholder', 'woocommerce' ), $this );
woocommerce/includes/abstracts/abstract-wc-product.php 1924
return apply_filters( 'woocommerce_product_single_add_to_cart_text', __( 'Add to cart', 'woocommerce' ), $this );

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

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