fix(ns): root-qualify PHP builtins after PSR-4 move
Namespaced classes resolved DateTimeImmutable etc. under AKSRT\* (e.g. Credits\DateTimeImmutable). Prefix with \ globally.
This commit is contained in:
1 parent
0335517467
commit
da59d550ad
7 files changed
+15
-15
No files matched your search
@@ -57,7 +57,7 @@ class Earn {
|
||||
if ($user_id <= 0 || !class_exists('PointsFree')) {
|
||||
return;
|
||||
}
|
||||
$today = (new DateTimeImmutable('today', wp_timezone()))->format('Y-m-d');
|
||||
$today = (new \DateTimeImmutable('today', wp_timezone()))->format('Y-m-d');
|
||||
$last = (string) get_user_meta($user_id, PointsFree::META_LOGIN, true);
|
||||
if ($last === $today) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user