WordPress at Your Fingertips
function is not described

WC_AJAX::delete_order_note() public WC 1.0

Delete order note via ajax.

{} It's a method of the class: WC_AJAX{}

No Hooks.

Return

null. Nothing.

Usage

$result = WC_AJAX::delete_order_note();

Code of WC_AJAX::delete_order_note() WC 5.9.0

public static function delete_order_note() {
	check_ajax_referer( 'delete-order-note', 'security' );

	if ( ! current_user_can( 'edit_shop_orders' ) || ! isset( $_POST['note_id'] ) ) {
		wp_die( -1 );
	}

	$note_id = (int) $_POST['note_id'];

	if ( $note_id > 0 ) {
		wc_delete_order_note( $note_id );
	}
	wp_die();
}