wc_delete_order_note()
Delete an order note.
Хуки из функции
Возвращает
true|false
. True on success, false on failure.
Использование
wc_delete_order_note( $note_id );
- $note_id(int) (обязательный)
- Order note.
Список изменений
С версии 3.2.0 | Введена. |
Код wc_delete_order_note() wc delete order note WC 9.3.1
function wc_delete_order_note( $note_id ) { $note = wc_get_order_note( $note_id ); if ( $note && wp_delete_comment( $note_id, true ) ) { /** * Action hook fired after an order note is deleted. * * @param int $note_id Order note ID. * @param stdClass $note Object with the deleted order note details. * * @since 9.1.0 */ do_action( 'woocommerce_order_note_deleted', $note_id, $note ); return true; } return false; }