You appear to be a bot. Output may be restricted
Description
Add a note to a payment
Usage
$int = edd_insert_payment_note( $payment_id, $note );
Parameters
- $payment_id
- ( int ) optional – The payment ID to store a note for
- $note
- ( string ) optional – The note to store
Returns
int The new note ID
Source
File name: easy-digital-downloads/includes/payments/functions.php
Lines:
1 to 26 of 26
function edd_insert_payment_note( $payment_id = 0, $note = '' ) { if ( empty( $payment_id ) ) return false; do_action( 'edd_pre_insert_payment_note', $payment_id, $note ); $note_id = wp_insert_comment( wp_filter_comment( array( 'comment_post_ID' => $payment_id, 'comment_content' => $note, 'user_id' => is_admin() ? get_current_user_id() : 0, 'comment_date' => current_time( 'mysql' ), 'comment_date_gmt' => current_time( 'mysql', 1 ), 'comment_approved' => 1, 'comment_parent' => 0, 'comment_author' => '', 'comment_author_IP' => '', 'comment_author_url' => '', 'comment_author_email' => '', 'comment_type' => 'edd_payment_note' ) ) ); do_action( 'edd_insert_payment_note', $note_id, $payment_id, $note ); return $note_id; }