| @@ 41-43 (lines=3) @@ | ||
| 38 | ||
| 39 | // Sanity check... fail if donation ID is invalid |
|
| 40 | $payment_exists = $payment->ID; |
|
| 41 | if ( empty( $payment_exists ) ) { |
|
| 42 | wp_die( __( 'The specified ID does not belong to a donation. Please try again.', 'give' ), __( 'Error', 'give' ), array( 'response' => 400 ) ); |
|
| 43 | } |
|
| 44 | ||
| 45 | $number = $payment->number; |
|
| 46 | $payment_meta = $payment->get_meta(); |
|
| @@ 1861-1865 (lines=5) @@ | ||
| 1858 | ) ); |
|
| 1859 | } |
|
| 1860 | ||
| 1861 | if ( empty( $args['user_id'] ) ) { |
|
| 1862 | wp_die( __( 'User ID Required.', 'give' ), __( 'Error', 'give' ), array( |
|
| 1863 | 'response' => 401, |
|
| 1864 | ) ); |
|
| 1865 | } |
|
| 1866 | ||
| 1867 | if ( is_numeric( $args['user_id'] ) ) { |
|
| 1868 | $user_id = isset( $args['user_id'] ) ? absint( $args['user_id'] ) : get_current_user_id(); |
|