| @@ 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(); |
|
| @@ 1873-1877 (lines=5) @@ | ||
| 1870 | ) ); |
|
| 1871 | } |
|
| 1872 | ||
| 1873 | if ( empty( $args['user_id'] ) ) { |
|
| 1874 | wp_die( __( 'User ID Required.', 'give' ), __( 'Error', 'give' ), array( |
|
| 1875 | 'response' => 401, |
|
| 1876 | ) ); |
|
| 1877 | } |
|
| 1878 | ||
| 1879 | if ( is_numeric( $args['user_id'] ) ) { |
|
| 1880 | $user_id = isset( $args['user_id'] ) ? absint( $args['user_id'] ) : get_current_user_id(); |
|