PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk All 48 releases
← All changes | app/Helpers/CartHelper.php +2 -1 1.6.0 → 1.6.5 View file →
@@ -790,9 +790,10 @@
790 790 {
791 791 if (is_user_logged_in()) {
792 792 $wpUser = wp_get_current_user();
793 793 $cart->user_id = get_current_user_id();
794 - $customer = Customer::query()->where('email', wp_get_current_user()->user_email)->first();
794 + // The cart belongs to the account's linked customer, not to whichever record holds its email.
795 + $customer = Customer::query()->where('user_id', $wpUser->ID)->orderBy('id', 'ASC')->first();
795 796 if ($customer) {
796 797 $cart->customer_id = $customer->id;
797 798 }
798 799 $cart->email = $wpUser->user_email;