WC_Product_Variable::add_to_cart_aria_describedby()publicWC 1.0

Get the aria-describedby description for the add to cart button. Note that this is to provide the description, not the describedby attribute itself.

Method of the class: WC_Product_Variable{}

Return

String.

Usage

$WC_Product_Variable = new WC_Product_Variable();
$WC_Product_Variable->add_to_cart_aria_describedby();

WC_Product_Variable::add_to_cart_aria_describedby() code WC 9.4.2

public function add_to_cart_aria_describedby() {
	/**
	 * This filter is documented in includes/abstracts/abstract-wc-product.php.
	 *
	 * @since 7.8.0
	 */
	return apply_filters( 'woocommerce_product_add_to_cart_aria_describedby', $this->is_purchasable() ? __( 'This product has multiple variants. The options may be chosen on the product page', 'woocommerce' ) : '', $this );
}