woocommerce_cart_item_backorder_notification
Использование
add_filter( 'woocommerce_cart_item_backorder_notification', 'wp_kama_woocommerce_cart_item_backorder_notification_filter', 10, 2 ); /** * Function for `woocommerce_cart_item_backorder_notification` filter-hook. * * @param $html * @param $product_id * * @return */ function wp_kama_woocommerce_cart_item_backorder_notification_filter( $html, $product_id ){ // filter... return $html; }
- $html
- -
- $product_id
- -
Где вызывается хук
В файле: /templates/cart/cart.php
woocommerce_cart_item_backorder_notification
woocommerce/templates/cart/cart.php 107
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'woocommerce' ) . '</p>', $product_id ) );