Code Duplication    Length = 10-10 lines in 2 locations

includes/payments/functions.php 1 location

@@ 1271-1280 (lines=10) @@
1268
 *
1269
 * @return string The donation ID.
1270
 */
1271
function give_get_payment_transaction_id( $payment_id = 0 ) {
1272
	$transaction_id = give_get_meta( $payment_id, '_give_payment_transaction_id', true );
1273
1274
	if ( empty( $transaction_id ) ) {
1275
		$gateway        = give_get_payment_gateway( $payment_id );
1276
		$transaction_id = apply_filters( "give_get_payment_transaction_id-{$gateway}", $payment_id );
1277
	}
1278
1279
	return $transaction_id;
1280
}
1281
1282
/**
1283
 * Sets a Transaction ID in post meta for the given Payment ID.

includes/forms/functions.php 1 location

@@ 1024-1033 (lines=10) @@
1021
 *
1022
 * @return bool  $ret Whether or not the logged_in_only setting is set
1023
 */
1024
function give_logged_in_only( $form_id ) {
1025
	// If _give_logged_in_only is set to enable then guest can donate from that specific form.
1026
	// Otherwise it is member only donation form.
1027
	$val = give_get_meta( $form_id, '_give_logged_in_only', true );
1028
	$val = ! empty( $val ) ? $val : 'enabled';
1029
1030
	$ret = ! give_is_setting_enabled( $val );
1031
1032
	return (bool) apply_filters( 'give_logged_in_only', $ret, $form_id );
1033
}
1034
1035
1036
/**