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  $this->get_button_text() 
 * @param  $that                    
 *
 * @return 
 */
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
-

Where the hook is called

WC_Product_External::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_Grouped::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
woocommerce/includes/class-wc-product-external.php 184
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-variable.php 79
return apply_filters( 'woocommerce_product_add_to_cart_text', $this->is_purchasable() ? __( 'Select options', 'woocommerce' ) : __( 'Read more', 'woocommerce' ), $this );
woocommerce/includes/class-wc-product-grouped.php 44
return apply_filters( 'woocommerce_product_add_to_cart_text', __( 'View products', 'woocommerce' ), $this );
woocommerce/includes/class-wc-product-simple.php 64
return apply_filters( 'woocommerce_product_add_to_cart_text', $text, $this );
woocommerce/includes/abstracts/abstract-wc-product.php 2059
return apply_filters( 'woocommerce_product_add_to_cart_text', __( 'Read more', 'woocommerce' ), $this );

Where the hook is used in WooCommerce

Usage not found.