woocommerce_product_add_to_cart_text filter-hookWC 1.0

Get the add to cart button text.

Usage

add_filter( 'woocommerce_product_add_to_cart_text', 'wp_kama_woocommerce_product_add_to_cart_text_filter', 10, 2 );

/**
 * Function for `woocommerce_product_add_to_cart_text` filter-hook.
 * 
 * @param  $__   
 * @param  $that 
 *
 * @return 
 */
function wp_kama_woocommerce_product_add_to_cart_text_filter( $__, $that ){

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

Where the hook is called

WC_Product::add_to_cart_text()
woocommerce_product_add_to_cart_text
WC_Product_Variable::add_to_cart_text()
woocommerce_product_add_to_cart_text
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_Grouped::add_to_cart_text()
woocommerce_product_add_to_cart_text
woocommerce/includes/abstracts/abstract-wc-product.php 1962
return apply_filters( 'woocommerce_product_add_to_cart_text', __( 'Read more', 'woocommerce' ), $this );
woocommerce/includes/class-wc-product-variable.php 76
return apply_filters( 'woocommerce_product_add_to_cart_text', $this->is_purchasable() ? __( 'Select options', 'woocommerce' ) : __( 'Read more', 'woocommerce' ), $this );
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/class-wc-product-grouped.php 42
return apply_filters( 'woocommerce_product_add_to_cart_text', __( 'View products', 'woocommerce' ), $this );

Where the hook is used in WooCommerce

Usage not found.