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.9.8.1

apply_filters('woocommerce_product_add_to_cart_text') is found 5 times:

  • /includes/abstracts/abstract-wc-product.php line 2059
    2055
    2056
    2057
    2058
    2059
    2060
    2061
    2062
    2063
    2064
    2065
    *
     * @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 184
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    * @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 44
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    *
     * @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 64
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    */
    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 79
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    *
     * @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