woocommerce_blocks_product_grid_add_to_cart_attributes
woocommerce_blocks_product_grid_add_to_cart_attributes
Appears in: woocommerce.10.0.4, woocommerce.10.1.2, woocommerce.10.2.2, woocommerce.8.7.0, woocommerce.8.8.3, woocommerce.8.9.2, woocommerce.8.9.3, woocommerce.9.0.2, woocommerce.9.1.2, woocommerce.9.1.4, woocommerce.9.2.2, woocommerce.9.2.3, woocommerce.9.3.1, woocommerce.9.3.3, woocommerce.9.4.2, woocommerce.9.4.3, woocommerce.9.5.1, woocommerce.9.5.2, woocommerce.9.7.0, woocommerce.9.7.1, woocommerce.9.8.1, woocommerce.9.9.3, woocommerce.9.9.5
Hook Type: filter
Displaying hooks found in version: woocommerce.9.9.5apply_filters('woocommerce_blocks_product_grid_add_to_cart_attributes') is found 1 times:
- /src/Blocks/BlockTypes/AbstractProductGrid.php line 681
* @param WC_Product $product The WC_Product instance of the product that will be added to the cart once the button is pressed. * * @return array Returns an associative array derived from the default array passed as an argument and added the extra HTML attributes. */ $attributes = apply_filters( 'woocommerce_blocks_product_grid_add_to_cart_attributes', $attributes, $product ); return sprintf( '<a href="%s" %s>%s</a>', esc_url( $product->add_to_cart_url() ), wc_implode_html_attributes( $attributes ), esc_html( $product->add_to_cart_text() )