| @@ 973-982 (lines=10) @@ | ||
| 970 | * |
|
| 971 | * @return bool $ret Whether or not the logged_in_only setting is set |
|
| 972 | */ |
|
| 973 | function give_logged_in_only( $form_id ) { |
|
| 974 | // If _give_logged_in_only is set to enable then guest can donate from that specific form. |
|
| 975 | // Otherwise it is member only donation form. |
|
| 976 | $val = give_get_meta( $form_id, '_give_logged_in_only', true ); |
|
| 977 | $val = ! empty( $val ) ? $val : 'enabled'; |
|
| 978 | ||
| 979 | $ret = ! give_is_setting_enabled( $val ); |
|
| 980 | ||
| 981 | return (bool) apply_filters( 'give_logged_in_only', $ret, $form_id ); |
|
| 982 | } |
|
| 983 | ||
| 984 | ||
| 985 | /** |
|
| @@ 1263-1272 (lines=10) @@ | ||
| 1260 | * |
|
| 1261 | * @return string The donation ID. |
|
| 1262 | */ |
|
| 1263 | function give_get_payment_transaction_id( $payment_id = 0 ) { |
|
| 1264 | $transaction_id = give_get_meta( $payment_id, '_give_payment_transaction_id', true ); |
|
| 1265 | ||
| 1266 | if ( empty( $transaction_id ) ) { |
|
| 1267 | $gateway = give_get_payment_gateway( $payment_id ); |
|
| 1268 | $transaction_id = apply_filters( "give_get_payment_transaction_id-{$gateway}", $payment_id ); |
|
| 1269 | } |
|
| 1270 | ||
| 1271 | return $transaction_id; |
|
| 1272 | } |
|
| 1273 | ||
| 1274 | /** |
|
| 1275 | * Sets a Transaction ID in post meta for the given Payment ID. |
|