edd_ajax_delete_payment_note

Delete a payment note deletion with ajax.

Description

edd_ajax_delete_payment_note(); 

Usage

  1. if ( !function_exists( 'edd_ajax_delete_payment_note' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'easy-digital-downloads/includes/admin/payments/actions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = edd_ajax_delete_payment_note(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/admin/payments/actions.php  
  1. function edd_ajax_delete_payment_note() { 
  2.  
  3. if( ! current_user_can( 'edit_shop_payments', $_POST['payment_id'] ) ) { 
  4. wp_die( __( 'You do not have permission to edit this payment record', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); 
  5.  
  6. if( edd_delete_payment_note( $_POST['note_id'], $_POST['payment_id'] ) ) { 
  7. die( '1' ); 
  8. } else { 
  9. die( '-1' ); 
  10.