woocommerce_purchase_note_order_statuses
Render an item purchase note.
Использование
add_filter( 'woocommerce_purchase_note_order_statuses', 'wp_kama_woocommerce_purchase_note_order_statuses_filter' ); /** * Function for `woocommerce_purchase_note_order_statuses` filter-hook. * * @param \WC_Order $order Order object. * * @return \WC_Order */ function wp_kama_woocommerce_purchase_note_order_statuses_filter( $order ){ // filter... return $order; }
- $order(\WC_Order)
- Order object.
Где вызывается хук
woocommerce_purchase_note_order_statuses
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Totals.php 177
$show_purchase_note = $order->has_status( apply_filters( 'woocommerce_purchase_note_order_statuses', array( 'completed', 'processing' ) ) );
woocommerce/templates/order/order-details.php 31
$show_purchase_note = $order->has_status( apply_filters( 'woocommerce_purchase_note_order_statuses', array( 'completed', 'processing' ) ) );