PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.17.0
GiveWP – Donation Plugin and Fundraising Platform v4.17.0
4.17.0 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 All 256 releases
← All changes | includes/admin/import-functions.php +4 -1 4.16.1 → 4.17.0 View file →
@@ -13,8 +13,10 @@
13 13 if ( ! defined( 'ABSPATH' ) ) {
14 14 exit;
15 15 }
16 16
17 +use Give\Donations\Actions\GeneratePurchaseKey;
18 +
17 19 /**
18 20 * Get the Import report of the donations
19 21 *
20 22 * @since 1.8.13
@@ -651,8 +653,9 @@
651 653
652 654 /**
653 655 * Add import Donation forms, donations , donor from CSV to database
654 656 *
657 + * @since 4.17.0 Generate the purchase key with the shared GeneratePurchaseKey action.
655 658 * @since 1.8.13
656 659 *
657 660 * @param array $raw_key Setup bu user at step 2.
658 661 * @param array $row_data Feilds that are being imported from CSV
@@ -814,9 +817,9 @@
814 817 'gateway' => ( ! empty( $data['gateway'] ) ? strtolower( $data['gateway'] ) : 'manual' ),
815 818 'give_form_title' => ( ! empty( $data['form_title'] ) ? $data['form_title'] : ( method_exists( $form, 'get_name' ) ? $form->get_name() : '' ) ),
816 819 'give_form_id' => ( ! empty( $form ) && method_exists( $form, 'get_ID' ) ) ? $form->get_ID() : '',
817 820 'give_price_id' => $price_id,
818 - 'purchase_key' => strtolower( md5( uniqid() ) ),
821 + 'purchase_key' => (new GeneratePurchaseKey())($data['email']),
819 822 'user_email' => $data['email'],
820 823 'post_date' => $post_date,
821 824 'mode' => ( ! empty( $data['mode'] ) ? ( in_array( strtolower( $data['mode'] ), $test_mode ) ? 'test' : 'live' ) : ( isset( $import_setting['mode'] ) ? ( true == (bool) $import_setting['mode'] ? 'test' : 'live' ) : ( give_is_test_mode() ? 'test' : 'live' ) ) ),
822 825 ];