woocommerce_add_to_cart_with_options_html
Filter to modify the add to cart with options HTML output.
Использование
add_filter( 'woocommerce_add_to_cart_with_options_html', 'wp_kama_woocommerce_add_to_cart_with_options_html_filter' ); /** * Function for `woocommerce_add_to_cart_with_options_html` filter-hook. * * @param string $content The HTML content for the add to cart with options block. * * @return string */ function wp_kama_woocommerce_add_to_cart_with_options_html_filter( $content ){ // filter... return $content; }
- $content(строка)
- The HTML content for the add to cart with options block.
Список изменений
С версии 9.6.0 | Введена. |
Где вызывается хук
woocommerce_add_to_cart_with_options_html
woocommerce/src/Blocks/BlockTypes/AddToCartWithOptions.php 99
$product_html = apply_filters( 'woocommerce_add_to_cart_with_options_html', $content );