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/Helper.php +7 -3 1.6.4 → 1.6.5 View file →
@@ -609,10 +609,12 @@
609 609 if (!$user) {
610 610 return null;
611 611 }
612 612
613 + // Identity only — see CustomerResource::getCurrentCustomer() for why an
614 + // email match must never reach a customer row.
613 615 return Customer::query()->where('user_id', $user->ID)
614 - ->orWhere('email', $user->user_email)
616 + ->orderBy('id', 'ASC')
615 617 ->first();
616 618 }
617 619
618 620 /**
@@ -1402,14 +1404,16 @@
1402 1404 $month = (int) Arr::get($anchor, 'month', 0);
1403 1405
1404 1406 if ($month && $day) {
1405 1407 /* translators: %s is a date, e.g. "on Aug 19" */
1406 - return sprintf(__('on %s', 'fluent-cart'), gmdate('M', gmmktime(12, 0, 0, $month, 1, 2001)) . ' ' . $day);
1408 + // wp_date(), not gmdate(): gmdate() has no locale, so this month
1409 + // name stayed English inside an otherwise translated sentence.
1410 + return sprintf(__('on %s', 'fluent-cart'), wp_date('M', gmmktime(12, 0, 0, $month, 1, 2001), new \DateTimeZone('UTC')) . ' ' . $day);
1407 1411 }
1408 1412
1409 1413 if ($month) {
1410 1414 /* translators: %s is a month name, e.g. "in August" */
1411 - return sprintf(__('in %s', 'fluent-cart'), gmdate('F', gmmktime(12, 0, 0, $month, 1, 2001)));
1415 + return sprintf(__('in %s', 'fluent-cart'), wp_date('F', gmmktime(12, 0, 0, $month, 1, 2001), new \DateTimeZone('UTC')));
1412 1416 }
1413 1417
1414 1418 /* translators: %s is an ordinal day of month, e.g. "on the 10th" */
1415 1419 return sprintf(__('on the %s', 'fluent-cart'), gmdate('jS', gmmktime(12, 0, 0, 1, $day, 2001)));