woocommerce_product_add_to_cart_text

woocommerce_product_add_to_cart_text

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_product_add_to_cart_text') is found 5 times:

  • /includes/abstracts/abstract-wc-product.php line 1962
    	 *
    	 * @return string
    	 */
    	public function add_to_cart_text() {
    		return apply_filters( 'woocommerce_product_add_to_cart_text', __( 'Read more', 'woocommerce' ), $this );
    	}
    
    	/**
    	 * Get the add to cart button text description - used in aria tags.
    	 *
    	 * @since  3.3.0
    
  • /includes/class-wc-product-external.php line 181
    	 * @access public
    	 * @return string
    	 */
    	public function add_to_cart_text() {
    		return apply_filters( 'woocommerce_product_add_to_cart_text', $this->get_button_text() ? $this->get_button_text() : _x( 'Buy product', 'placeholder', 'woocommerce' ), $this );
    	}
    
    	/**
    	 * Get the add to cart button text description - used in aria tags.
    	 *
    	 * @since 3.3.0
    
  • /includes/class-wc-product-grouped.php line 42
    	 *
    	 * @return string
    	 */
    	public function add_to_cart_text() {
    		return apply_filters( 'woocommerce_product_add_to_cart_text', __( 'View products', 'woocommerce' ), $this );
    	}
    
    	/**
    	 * Get the add to cart button text description - used in aria tags.
    	 *
    	 * @since 3.3.0
    
  • /includes/class-wc-product-simple.php line 62
    	 */
    	public function add_to_cart_text() {
    		$text = $this->is_purchasable() && $this->is_in_stock() ? __( 'Add to cart', 'woocommerce' ) : __( 'Read more', 'woocommerce' );
    
    		return apply_filters( 'woocommerce_product_add_to_cart_text', $text, $this );
    	}
    
    	/**
    	 * Get the add to cart button text description - used in aria tags.
    	 *
    	 * @since 3.3.0
    
  • /includes/class-wc-product-variable.php line 74
    	 *
    	 * @return string
    	 */
    	public function add_to_cart_text() {
    		return apply_filters( 'woocommerce_product_add_to_cart_text', $this->is_purchasable() ? __( 'Select options', 'woocommerce' ) : __( 'Read more', 'woocommerce' ), $this );
    	}
    
    	/**
    	 * Get the add to cart button text description - used in aria tags.
    	 *
    	 * @since 3.3.0