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  $__   
 * @param  $that 
 *
 * @return 
 */
function wp_kama_woocommerce_product_single_add_to_cart_text_filter( $__, $that ){

	// filter...
	return $__;
}
$__
-
$that
-

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

WC_Product::single_add_to_cart_text()
woocommerce_product_single_add_to_cart_text
WC_Product_External::single_add_to_cart_text()
woocommerce_product_single_add_to_cart_text
woocommerce/includes/abstracts/abstract-wc-product.php 1971
return apply_filters( 'woocommerce_product_single_add_to_cart_text', __( 'Add to cart', 'woocommerce' ), $this );
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

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