PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
← All changes | includes/actions.php +5 -0 4.16.24.16.9 View file →
@@ -97,13 +97,18 @@
97 97 *
98 98 * @param int $user_id User ID.
99 99 * @param array $user_data User Data.
100 100 *
101 + * @since 4.16.6 Only auto-link when registered via the donation-checkout flow.
101 102 * @since 1.7
102 103 *
103 104 * @return void
104 105 */
105 106 function give_connect_donor_to_wpuser( $user_id, $user_data ) {
107 + if ( empty( $user_data['give_donation_checkout_registration'] ) ) {
108 + return;
109 + }
110 +
106 111 /* @var Give_Donor $donor */
107 112 $donor = new Give_Donor( $user_data['user_email'] );
108 113
109 114 // Validate donor id and check if do nor is already connect to wp user or not.