woocommerce_product_add_to_cart_description
translators: %s: Product title
Usage
add_filter( 'woocommerce_product_add_to_cart_description', 'wp_kama_woocommerce_product_add_to_cart_description_filter', 10, 2 ); /** * Function for `woocommerce_product_add_to_cart_description` filter-hook. * * @param $sprintf * @param $that * * @return */ function wp_kama_woocommerce_product_add_to_cart_description_filter( $sprintf, $that ){ // filter... return $sprintf; }
- $sprintf
- -
- $that
- -
Where the hook is called
woocommerce_product_add_to_cart_description
woocommerce_product_add_to_cart_description
woocommerce_product_add_to_cart_description
woocommerce_product_add_to_cart_description
woocommerce_product_add_to_cart_description
woocommerce/includes/abstracts/abstract-wc-product.php 2008
return apply_filters( 'woocommerce_product_add_to_cart_description', sprintf( __( 'Read more about “%s”', 'woocommerce' ), $this->get_name() ), $this );
woocommerce/includes/class-wc-product-variable.php 87
return apply_filters( 'woocommerce_product_add_to_cart_description', sprintf( __( 'Select options for “%s”', 'woocommerce' ), $this->get_name() ), $this );
woocommerce/includes/class-wc-product-external.php 192
return apply_filters( 'woocommerce_product_add_to_cart_description', $this->get_button_text() ? $this->get_button_text() : sprintf( __( 'Buy “%s”', 'woocommerce' ), $this->get_name() ), $this );
woocommerce/includes/class-wc-product-simple.php 75
return apply_filters( 'woocommerce_product_add_to_cart_description', sprintf( $text, $this->get_name() ), $this );
woocommerce/includes/class-wc-product-grouped.php 53
return apply_filters( 'woocommerce_product_add_to_cart_description', sprintf( __( 'View products in the “%s” group', 'woocommerce' ), $this->get_name() ), $this );