Plugin Directory

Changeset 3379694


Ignore:
Timestamp:
10/16/2025 06:41:53 PM (6 months ago)
Author:
grocerslist
Message:

v1.6.0 - JS tag loading optimizations

Location:
grocerslist
Files:
207 added
22 edited

Legend:

Unmodified
Added
Removed
  • grocerslist/trunk/README.md

    r3379109 r3379694  
    44Author: Grocers List, Engineering
    55Tested up to: 6.8
    6 Stable tag: 1.5.0
     6Stable tag: 1.6.0
    77Requires PHP: 7.0
    88License: GPLv3
     
    5858#### - 10/15/2025 - 1.5.0 - API updates to inform GL API of the blog URL
    5959
     60#### - 10/16/2025 - 1.6.0 - JS tag loading optimizations
     61
    6062### Resources:
    6163
  • grocerslist/trunk/composer.lock

    r3322331 r3379694  
    5959        {
    6060            "name": "woocommerce/action-scheduler",
    61             "version": "3.9.2",
     61            "version": "3.9.3",
    6262            "source": {
    6363                "type": "git",
    6464                "url": "https://github.com/woocommerce/action-scheduler.git",
    65                 "reference": "efbb7953f72a433086335b249292f280dd43ddfe"
    66             },
    67             "dist": {
    68                 "type": "zip",
    69                 "url": "https://api.github.com/repos/woocommerce/action-scheduler/zipball/efbb7953f72a433086335b249292f280dd43ddfe",
    70                 "reference": "efbb7953f72a433086335b249292f280dd43ddfe",
    71                 "shasum": ""
    72             },
    73             "require": {
    74                 "php": ">=7.1"
    75             },
    76             "require-dev": {
    77                 "phpunit/phpunit": "^7.5",
     65                "reference": "c58cdbab17651303d406cd3b22cf9d75c71c986c"
     66            },
     67            "dist": {
     68                "type": "zip",
     69                "url": "https://api.github.com/repos/woocommerce/action-scheduler/zipball/c58cdbab17651303d406cd3b22cf9d75c71c986c",
     70                "reference": "c58cdbab17651303d406cd3b22cf9d75c71c986c",
     71                "shasum": ""
     72            },
     73            "require": {
     74                "php": ">=7.2"
     75            },
     76            "require-dev": {
     77                "phpunit/phpunit": "^8.5",
    7878                "woocommerce/woocommerce-sniffs": "0.1.0",
    7979                "wp-cli/wp-cli": "~2.5.0",
     
    9696            "support": {
    9797                "issues": "https://github.com/woocommerce/action-scheduler/issues",
    98                 "source": "https://github.com/woocommerce/action-scheduler/tree/3.9.2"
    99             },
    100             "time": "2025-02-03T09:09:30+00:00"
     98                "source": "https://github.com/woocommerce/action-scheduler/tree/3.9.3"
     99            },
     100            "time": "2025-07-15T09:32:30+00:00"
    101101        }
    102102    ],
     
    104104        {
    105105            "name": "antecedent/patchwork",
    106             "version": "2.2.1",
     106            "version": "2.2.3",
    107107            "source": {
    108108                "type": "git",
    109109                "url": "https://github.com/antecedent/patchwork.git",
    110                 "reference": "1bf183a3e1bd094f231a2128b9ecc5363c269245"
    111             },
    112             "dist": {
    113                 "type": "zip",
    114                 "url": "https://api.github.com/repos/antecedent/patchwork/zipball/1bf183a3e1bd094f231a2128b9ecc5363c269245",
    115                 "reference": "1bf183a3e1bd094f231a2128b9ecc5363c269245",
     110                "reference": "8b6b235f405af175259c8f56aea5fc23ab9f03ce"
     111            },
     112            "dist": {
     113                "type": "zip",
     114                "url": "https://api.github.com/repos/antecedent/patchwork/zipball/8b6b235f405af175259c8f56aea5fc23ab9f03ce",
     115                "reference": "8b6b235f405af175259c8f56aea5fc23ab9f03ce",
    116116                "shasum": ""
    117117            },
     
    146146            "support": {
    147147                "issues": "https://github.com/antecedent/patchwork/issues",
    148                 "source": "https://github.com/antecedent/patchwork/tree/2.2.1"
    149             },
    150             "time": "2024-12-11T10:19:54+00:00"
     148                "source": "https://github.com/antecedent/patchwork/tree/2.2.3"
     149            },
     150            "time": "2025-09-17T09:00:56+00:00"
    151151        },
    152152        {
     
    356356        {
    357357            "name": "myclabs/deep-copy",
    358             "version": "1.13.1",
     358            "version": "1.13.4",
    359359            "source": {
    360360                "type": "git",
    361361                "url": "https://github.com/myclabs/DeepCopy.git",
    362                 "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c"
    363             },
    364             "dist": {
    365                 "type": "zip",
    366                 "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/1720ddd719e16cf0db4eb1c6eca108031636d46c",
    367                 "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c",
     362                "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a"
     363            },
     364            "dist": {
     365                "type": "zip",
     366                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a",
     367                "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a",
    368368                "shasum": ""
    369369            },
     
    404404            "support": {
    405405                "issues": "https://github.com/myclabs/DeepCopy/issues",
    406                 "source": "https://github.com/myclabs/DeepCopy/tree/1.13.1"
     406                "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4"
    407407            },
    408408            "funding": [
     
    412412                }
    413413            ],
    414             "time": "2025-04-29T12:36:36+00:00"
     414            "time": "2025-08-01T08:46:24+00:00"
    415415        },
    416416        {
    417417            "name": "nikic/php-parser",
    418             "version": "v5.5.0",
     418            "version": "v5.6.1",
    419419            "source": {
    420420                "type": "git",
    421421                "url": "https://github.com/nikic/PHP-Parser.git",
    422                 "reference": "ae59794362fe85e051a58ad36b289443f57be7a9"
    423             },
    424             "dist": {
    425                 "type": "zip",
    426                 "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ae59794362fe85e051a58ad36b289443f57be7a9",
    427                 "reference": "ae59794362fe85e051a58ad36b289443f57be7a9",
     422                "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2"
     423            },
     424            "dist": {
     425                "type": "zip",
     426                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2",
     427                "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2",
    428428                "shasum": ""
    429429            },
     
    444444            "extra": {
    445445                "branch-alias": {
    446                     "dev-master": "5.0-dev"
     446                    "dev-master": "5.x-dev"
    447447                }
    448448            },
     
    468468            "support": {
    469469                "issues": "https://github.com/nikic/PHP-Parser/issues",
    470                 "source": "https://github.com/nikic/PHP-Parser/tree/v5.5.0"
    471             },
    472             "time": "2025-05-31T08:24:38+00:00"
     470                "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1"
     471            },
     472            "time": "2025-08-13T20:13:15+00:00"
    473473        },
    474474        {
     
    913913        {
    914914            "name": "phpunit/phpunit",
    915             "version": "10.5.47",
     915            "version": "10.5.58",
    916916            "source": {
    917917                "type": "git",
    918918                "url": "https://github.com/sebastianbergmann/phpunit.git",
    919                 "reference": "3637b3e50d32ab3a0d1a33b3b6177169ec3d95a3"
    920             },
    921             "dist": {
    922                 "type": "zip",
    923                 "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3637b3e50d32ab3a0d1a33b3b6177169ec3d95a3",
    924                 "reference": "3637b3e50d32ab3a0d1a33b3b6177169ec3d95a3",
     919                "reference": "e24fb46da450d8e6a5788670513c1af1424f16ca"
     920            },
     921            "dist": {
     922                "type": "zip",
     923                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e24fb46da450d8e6a5788670513c1af1424f16ca",
     924                "reference": "e24fb46da450d8e6a5788670513c1af1424f16ca",
    925925                "shasum": ""
    926926            },
     
    932932                "ext-xml": "*",
    933933                "ext-xmlwriter": "*",
    934                 "myclabs/deep-copy": "^1.13.1",
     934                "myclabs/deep-copy": "^1.13.4",
    935935                "phar-io/manifest": "^2.0.4",
    936936                "phar-io/version": "^3.2.1",
     
    943943                "sebastian/cli-parser": "^2.0.1",
    944944                "sebastian/code-unit": "^2.0.0",
    945                 "sebastian/comparator": "^5.0.3",
     945                "sebastian/comparator": "^5.0.4",
    946946                "sebastian/diff": "^5.1.1",
    947947                "sebastian/environment": "^6.1.0",
    948                 "sebastian/exporter": "^5.1.2",
     948                "sebastian/exporter": "^5.1.4",
    949949                "sebastian/global-state": "^6.0.2",
    950950                "sebastian/object-enumerator": "^5.0.0",
    951                 "sebastian/recursion-context": "^5.0.0",
     951                "sebastian/recursion-context": "^5.0.1",
    952952                "sebastian/type": "^4.0.0",
    953953                "sebastian/version": "^4.0.1"
     
    994994                "issues": "https://github.com/sebastianbergmann/phpunit/issues",
    995995                "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
    996                 "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.47"
     996                "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.58"
    997997            },
    998998            "funding": [
     
    10181018                }
    10191019            ],
    1020             "time": "2025-06-20T11:29:11+00:00"
     1020            "time": "2025-09-28T12:04:46+00:00"
    10211021        },
    10221022        {
     
    11901190        {
    11911191            "name": "sebastian/comparator",
    1192             "version": "5.0.3",
     1192            "version": "5.0.4",
    11931193            "source": {
    11941194                "type": "git",
    11951195                "url": "https://github.com/sebastianbergmann/comparator.git",
    1196                 "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e"
    1197             },
    1198             "dist": {
    1199                 "type": "zip",
    1200                 "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e",
    1201                 "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e",
     1196                "reference": "e8e53097718d2b53cfb2aa859b06a41abf58c62e"
     1197            },
     1198            "dist": {
     1199                "type": "zip",
     1200                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e8e53097718d2b53cfb2aa859b06a41abf58c62e",
     1201                "reference": "e8e53097718d2b53cfb2aa859b06a41abf58c62e",
    12021202                "shasum": ""
    12031203            },
     
    12551255                "issues": "https://github.com/sebastianbergmann/comparator/issues",
    12561256                "security": "https://github.com/sebastianbergmann/comparator/security/policy",
    1257                 "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.3"
     1257                "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.4"
    12581258            },
    12591259            "funding": [
     
    12611261                    "url": "https://github.com/sebastianbergmann",
    12621262                    "type": "github"
    1263                 }
    1264             ],
    1265             "time": "2024-10-18T14:56:07+00:00"
     1263                },
     1264                {
     1265                    "url": "https://liberapay.com/sebastianbergmann",
     1266                    "type": "liberapay"
     1267                },
     1268                {
     1269                    "url": "https://thanks.dev/u/gh/sebastianbergmann",
     1270                    "type": "thanks_dev"
     1271                },
     1272                {
     1273                    "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator",
     1274                    "type": "tidelift"
     1275                }
     1276            ],
     1277            "time": "2025-09-07T05:25:07+00:00"
    12661278        },
    12671279        {
     
    14561468        {
    14571469            "name": "sebastian/exporter",
    1458             "version": "5.1.2",
     1470            "version": "5.1.4",
    14591471            "source": {
    14601472                "type": "git",
    14611473                "url": "https://github.com/sebastianbergmann/exporter.git",
    1462                 "reference": "955288482d97c19a372d3f31006ab3f37da47adf"
    1463             },
    1464             "dist": {
    1465                 "type": "zip",
    1466                 "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf",
    1467                 "reference": "955288482d97c19a372d3f31006ab3f37da47adf",
     1474                "reference": "0735b90f4da94969541dac1da743446e276defa6"
     1475            },
     1476            "dist": {
     1477                "type": "zip",
     1478                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0735b90f4da94969541dac1da743446e276defa6",
     1479                "reference": "0735b90f4da94969541dac1da743446e276defa6",
    14681480                "shasum": ""
    14691481            },
     
    14741486            },
    14751487            "require-dev": {
    1476                 "phpunit/phpunit": "^10.0"
     1488                "phpunit/phpunit": "^10.5"
    14771489            },
    14781490            "type": "library",
     
    15221534                "issues": "https://github.com/sebastianbergmann/exporter/issues",
    15231535                "security": "https://github.com/sebastianbergmann/exporter/security/policy",
    1524                 "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2"
     1536                "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.4"
    15251537            },
    15261538            "funding": [
     
    15281540                    "url": "https://github.com/sebastianbergmann",
    15291541                    "type": "github"
    1530                 }
    1531             ],
    1532             "time": "2024-03-02T07:17:12+00:00"
     1542                },
     1543                {
     1544                    "url": "https://liberapay.com/sebastianbergmann",
     1545                    "type": "liberapay"
     1546                },
     1547                {
     1548                    "url": "https://thanks.dev/u/gh/sebastianbergmann",
     1549                    "type": "thanks_dev"
     1550                },
     1551                {
     1552                    "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter",
     1553                    "type": "tidelift"
     1554                }
     1555            ],
     1556            "time": "2025-09-24T06:09:11+00:00"
    15331557        },
    15341558        {
     
    17661790        {
    17671791            "name": "sebastian/recursion-context",
    1768             "version": "5.0.0",
     1792            "version": "5.0.1",
    17691793            "source": {
    17701794                "type": "git",
    17711795                "url": "https://github.com/sebastianbergmann/recursion-context.git",
    1772                 "reference": "05909fb5bc7df4c52992396d0116aed689f93712"
    1773             },
    1774             "dist": {
    1775                 "type": "zip",
    1776                 "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712",
    1777                 "reference": "05909fb5bc7df4c52992396d0116aed689f93712",
     1796                "reference": "47e34210757a2f37a97dcd207d032e1b01e64c7a"
     1797            },
     1798            "dist": {
     1799                "type": "zip",
     1800                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/47e34210757a2f37a97dcd207d032e1b01e64c7a",
     1801                "reference": "47e34210757a2f37a97dcd207d032e1b01e64c7a",
    17781802                "shasum": ""
    17791803            },
     
    17821806            },
    17831807            "require-dev": {
    1784                 "phpunit/phpunit": "^10.0"
     1808                "phpunit/phpunit": "^10.5"
    17851809            },
    17861810            "type": "library",
     
    18171841            "support": {
    18181842                "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
    1819                 "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0"
     1843                "security": "https://github.com/sebastianbergmann/recursion-context/security/policy",
     1844                "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.1"
    18201845            },
    18211846            "funding": [
     
    18231848                    "url": "https://github.com/sebastianbergmann",
    18241849                    "type": "github"
    1825                 }
    1826             ],
    1827             "time": "2023-02-03T07:05:40+00:00"
     1850                },
     1851                {
     1852                    "url": "https://liberapay.com/sebastianbergmann",
     1853                    "type": "liberapay"
     1854                },
     1855                {
     1856                    "url": "https://thanks.dev/u/gh/sebastianbergmann",
     1857                    "type": "thanks_dev"
     1858                },
     1859                {
     1860                    "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context",
     1861                    "type": "tidelift"
     1862                }
     1863            ],
     1864            "time": "2025-08-10T07:50:56+00:00"
    18281865        },
    18291866        {
  • grocerslist/trunk/grocerslist.php

    r3379109 r3379694  
    77Requires PHP: 7.0
    88Tested up to: 6.8
    9 Version: 1.5.0
    10 Stable tag: 1.5.0
     9Version: 1.6.0
     10Stable tag: 1.6.0
    1111Author: Grocers List Engineering
    1212License: GPLv3
     
    1818if (!defined('ABSPATH')) exit;
    1919
    20 define('GROCERS_LIST_VERSION', '1.5.0');
     20define('GROCERS_LIST_VERSION', '1.6.0');
    2121define('GROCERS_LIST_PLUGIN_FILE', __FILE__);
    2222define('GROCERS_LIST_PLUGIN_DIR', __DIR__);
  • grocerslist/trunk/includes/Frontend/ClientScripts.php

    r3375241 r3379694  
    9393
    9494        if ($membershipsFullyEnabled && !empty($externalJsUrl)) {
    95             wp_enqueue_script('grocers-list-external', $externalJsUrl, [], $this->get_cache_busting_string(), false);
     95            wp_enqueue_script('grocers-list-external', $externalJsUrl, [], $this->get_cache_busting_string(), array('strategy' => 'async', 'in_footer' => false));
    9696        }
    9797    }
  • grocerslist/trunk/vendor/composer/installed.json

    r3322331 r3379694  
    5656        {
    5757            "name": "woocommerce/action-scheduler",
    58             "version": "3.9.2",
    59             "version_normalized": "3.9.2.0",
     58            "version": "3.9.3",
     59            "version_normalized": "3.9.3.0",
    6060            "source": {
    6161                "type": "git",
    6262                "url": "https://github.com/woocommerce/action-scheduler.git",
    63                 "reference": "efbb7953f72a433086335b249292f280dd43ddfe"
     63                "reference": "c58cdbab17651303d406cd3b22cf9d75c71c986c"
    6464            },
    6565            "dist": {
    6666                "type": "zip",
    67                 "url": "https://api.github.com/repos/woocommerce/action-scheduler/zipball/efbb7953f72a433086335b249292f280dd43ddfe",
    68                 "reference": "efbb7953f72a433086335b249292f280dd43ddfe",
     67                "url": "https://api.github.com/repos/woocommerce/action-scheduler/zipball/c58cdbab17651303d406cd3b22cf9d75c71c986c",
     68                "reference": "c58cdbab17651303d406cd3b22cf9d75c71c986c",
    6969                "shasum": ""
    7070            },
    7171            "require": {
    72                 "php": ">=7.1"
     72                "php": ">=7.2"
    7373            },
    7474            "require-dev": {
    75                 "phpunit/phpunit": "^7.5",
     75                "phpunit/phpunit": "^8.5",
    7676                "woocommerce/woocommerce-sniffs": "0.1.0",
    7777                "wp-cli/wp-cli": "~2.5.0",
    7878                "yoast/phpunit-polyfills": "^2.0"
    7979            },
    80             "time": "2025-02-03T09:09:30+00:00",
     80            "time": "2025-07-15T09:32:30+00:00",
    8181            "type": "wordpress-plugin",
    8282            "extra": {
     
    9696            "support": {
    9797                "issues": "https://github.com/woocommerce/action-scheduler/issues",
    98                 "source": "https://github.com/woocommerce/action-scheduler/tree/3.9.2"
     98                "source": "https://github.com/woocommerce/action-scheduler/tree/3.9.3"
    9999            },
    100100            "install-path": "../woocommerce/action-scheduler"
  • grocerslist/trunk/vendor/composer/installed.php

    r3379109 r3379694  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '44d9c624a78b05a7857c7d7c98c4823c562c2dd5',
     6        'reference' => 'd8684d47e69897ac85591ed398c11dfc3e37e184',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '44d9c624a78b05a7857c7d7c98c4823c562c2dd5',
     16            'reference' => 'd8684d47e69897ac85591ed398c11dfc3e37e184',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
     
    3030        ),
    3131        'woocommerce/action-scheduler' => array(
    32             'pretty_version' => '3.9.2',
    33             'version' => '3.9.2.0',
    34             'reference' => 'efbb7953f72a433086335b249292f280dd43ddfe',
     32            'pretty_version' => '3.9.3',
     33            'version' => '3.9.3.0',
     34            'reference' => 'c58cdbab17651303d406cd3b22cf9d75c71c986c',
    3535            'type' => 'wordpress-plugin',
    3636            'install_path' => __DIR__ . '/../woocommerce/action-scheduler',
  • grocerslist/trunk/vendor/composer/platform_check.php

    r3322331 r3379694  
    55$issues = array();
    66
    7 if (!(PHP_VERSION_ID >= 70100)) {
    8     $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.';
     7if (!(PHP_VERSION_ID >= 70200)) {
     8    $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.';
    99}
    1010
     
    2020        }
    2121    }
    22     trigger_error(
    23         'Composer detected issues in your platform: ' . implode(' ', $issues),
    24         E_USER_ERROR
     22    throw new \RuntimeException(
     23        'Composer detected issues in your platform: ' . implode(' ', $issues)
    2524    );
    2625}
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/action-scheduler.php

    r3322331 r3379694  
    66 * Author: Automattic
    77 * Author URI: https://automattic.com/
    8  * Version: 3.9.2
     8 * Version: 3.9.3
    99 * License: GPLv3
    1010 * Requires at least: 6.5
    11  * Tested up to: 6.7
    12  * Requires PHP: 7.1
     11 * Tested up to: 6.8
     12 * Requires PHP: 7.2
    1313 *
    1414 * Copyright 2019 Automattic, Inc.  (https://automattic.com/contact/)
     
    3030 */
    3131
    32 if ( ! function_exists( 'action_scheduler_register_3_dot_9_dot_2' ) && function_exists( 'add_action' ) ) { // WRCS: DEFINED_VERSION.
     32if ( ! function_exists( 'action_scheduler_register_3_dot_9_dot_3' ) && function_exists( 'add_action' ) ) { // WRCS: DEFINED_VERSION.
    3333
    3434    if ( ! class_exists( 'ActionScheduler_Versions', false ) ) {
     
    3737    }
    3838
    39     add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_9_dot_2', 0, 0 ); // WRCS: DEFINED_VERSION.
     39    add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_9_dot_3', 0, 0 ); // WRCS: DEFINED_VERSION.
    4040
    4141    // phpcs:disable Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace
     
    4343     * Registers this version of Action Scheduler.
    4444     */
    45     function action_scheduler_register_3_dot_9_dot_2() { // WRCS: DEFINED_VERSION.
     45    function action_scheduler_register_3_dot_9_dot_3() { // WRCS: DEFINED_VERSION.
    4646        $versions = ActionScheduler_Versions::instance();
    47         $versions->register( '3.9.2', 'action_scheduler_initialize_3_dot_9_dot_2' ); // WRCS: DEFINED_VERSION.
     47        $versions->register( '3.9.3', 'action_scheduler_initialize_3_dot_9_dot_3' ); // WRCS: DEFINED_VERSION.
    4848    }
    4949
     
    5252     * Initializes this version of Action Scheduler.
    5353     */
    54     function action_scheduler_initialize_3_dot_9_dot_2() { // WRCS: DEFINED_VERSION.
     54    function action_scheduler_initialize_3_dot_9_dot_3() { // WRCS: DEFINED_VERSION.
    5555        // A final safety check is required even here, because historic versions of Action Scheduler
    5656        // followed a different pattern (in some unusual cases, we could reach this point and the
     
    6464    // Support usage in themes - load this version if no plugin has loaded a version yet.
    6565    if ( did_action( 'plugins_loaded' ) && ! doing_action( 'plugins_loaded' ) && ! class_exists( 'ActionScheduler', false ) ) {
    66         action_scheduler_initialize_3_dot_9_dot_2(); // WRCS: DEFINED_VERSION.
     66        action_scheduler_initialize_3_dot_9_dot_3(); // WRCS: DEFINED_VERSION.
    6767        do_action( 'action_scheduler_pre_theme_init' );
    6868        ActionScheduler_Versions::initialize_latest_version();
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/changelog.txt

    r3322331 r3379694  
    11*** Changelog ***
     2
     3= 3.9.3 - 2025-07-15 =
     4* Add hook 'action_scheduler_ensure_recurring_actions' specifically for scheduling recurring actions.
     5* Assume an action is valid until proven otherwise.
     6* Implement SKIP LOCKED during action claiming.
     7* Import `get_flag_value()` from `WP_CLI\Utils` before using.
     8* Make `$unique` available to all pre-creation/short-circuit hooks.
     9* Make version/source information available via new class.
     10* Only release claims on pending actions.
     11* Tweak - WP 6.8 compatibility.
     12* Update minimum supported php and phpunit versions.
     13* Update readme.txt.
     14* WP CLI get action command: correct parentheses/nesting of conditional checks.
    215
    316= 3.9.2 - 2025-02-03 =
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/classes/ActionScheduler_DataController.php

    r3322331 r3379694  
    163163        }
    164164
    165         $wp_object_cache->group_ops      = array();
    166         $wp_object_cache->stats          = array();
    167         $wp_object_cache->memcache_debug = array();
    168         $wp_object_cache->cache          = array();
     165        // Not all drop-ins support these props, however, there may be existing installations that rely on these being cleared.
     166        if ( property_exists( $wp_object_cache, 'group_ops' ) ) {
     167            $wp_object_cache->group_ops = array();
     168        }
     169        if ( property_exists( $wp_object_cache, 'stats' ) ) {
     170            $wp_object_cache->stats = array();
     171        }
     172        if ( property_exists( $wp_object_cache, 'memcache_debug' ) ) {
     173            $wp_object_cache->memcache_debug = array();
     174        }
     175        if ( property_exists( $wp_object_cache, 'cache' ) ) {
     176            $wp_object_cache->cache = array();
     177        }
    169178
    170179        if ( is_callable( array( $wp_object_cache, '__remoteset' ) ) ) {
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/classes/ActionScheduler_wcSystemStatus.php

    r3322331 r3379694  
    7777        $action = $this->store->query_actions(
    7878            array(
    79                 'claimed'  => false,
    8079                'status'   => $status,
    8180                'per_page' => 1,
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/classes/WP_CLI/Action/Create_Command.php

    r3322331 r3379694  
    22
    33namespace Action_Scheduler\WP_CLI\Action;
     4
     5use function \WP_CLI\Utils\get_flag_value;
    46
    57/**
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/classes/WP_CLI/Action/Get_Command.php

    r3322331 r3379694  
    2525
    2626        $only_logs   = ! empty( $this->assoc_args['field'] ) && 'log_entries' === $this->assoc_args['field'];
    27         $only_logs   = $only_logs || ( ! empty( $this->assoc_args['fields'] && 'log_entries' === $this->assoc_args['fields'] ) );
     27        $only_logs   = $only_logs || ( ! empty( $this->assoc_args['fields'] ) && 'log_entries' === $this->assoc_args['fields'] );
    2828        $log_entries = array();
    2929
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/classes/WP_CLI/System_Command.php

    r3322331 r3379694  
    263263
    264264        $args = array(
    265             'claimed'  => false,
    266265            'status'   => $status,
    267266            'per_page' => 1,
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler.php

    r3322331 r3379694  
    185185        ActionScheduler_DataController::init();
    186186
    187         $store      = self::store();
    188         $logger     = self::logger();
    189         $runner     = self::runner();
    190         $admin_view = self::admin_view();
     187        $store                      = self::store();
     188        $logger                     = self::logger();
     189        $runner                     = self::runner();
     190        $admin_view                 = self::admin_view();
     191        $recurring_action_scheduler = new ActionScheduler_RecurringActionScheduler();
    191192
    192193        // Ensure initialization on plugin activation.
     
    197198            add_action( 'init', array( $logger, 'init' ), 1, 0 );
    198199            add_action( 'init', array( $runner, 'init' ), 1, 0 );
     200            add_action( 'init', array( $recurring_action_scheduler, 'init' ), 1, 0 );
    199201
    200202            add_action(
     
    224226            $logger->init();
    225227            $runner->init();
     228            $recurring_action_scheduler->init();
    226229            self::$data_store_initialized = true;
    227230
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php

    r3322331 r3379694  
    8787        try {
    8888            try {
    89                 $valid_action = false;
     89                $valid_action = true;
     90
    9091                do_action( 'action_scheduler_before_execute', $action_id, $context );
    9192
    9293                if ( ActionScheduler_Store::STATUS_PENDING !== $this->store->get_status( $action_id ) ) {
     94                    $valid_action = false;
    9395                    do_action( 'action_scheduler_execution_ignored', $action_id, $context );
    9496                    return;
    9597                }
    9698
    97                 $valid_action = true;
    9899                do_action( 'action_scheduler_begin_execute', $action_id, $context );
    99100
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php

    r3322331 r3379694  
    932932         */
    933933        global $wpdb;
    934 
    935934        $now  = as_get_datetime_object();
    936935        $date = is_null( $before_date ) ? $now : clone $before_date;
    937         // can't use $wpdb->update() because of the <= condition.
    938         $update = "UPDATE {$wpdb->actionscheduler_actions} SET claim_id=%d, last_attempt_gmt=%s, last_attempt_local=%s";
    939         $params = array(
    940             $claim_id,
    941             $now->format( 'Y-m-d H:i:s' ),
    942             current_time( 'mysql' ),
    943         );
    944936
    945937        // Set claim filters.
     
    955947        }
    956948
    957         $where    = 'WHERE claim_id = 0 AND scheduled_date_gmt <= %s AND status=%s';
    958         $params[] = $date->format( 'Y-m-d H:i:s' );
    959         $params[] = self::STATUS_PENDING;
     949        $where        = 'WHERE claim_id = 0 AND scheduled_date_gmt <= %s AND status=%s';
     950        $where_params = array(
     951            $date->format( 'Y-m-d H:i:s' ),
     952            self::STATUS_PENDING,
     953        );
    960954
    961955        if ( ! empty( $hooks ) ) {
    962956            $placeholders = array_fill( 0, count( $hooks ), '%s' );
    963             $where       .= ' AND hook IN (' . join( ', ', $placeholders ) . ')';
    964             $params       = array_merge( $params, array_values( $hooks ) );
     957            $where        .= ' AND hook IN (' . join( ', ', $placeholders ) . ')';
     958            $where_params = array_merge( $where_params, array_values( $hooks ) );
    965959        }
    966960
     
    997991         * Sets the order-by clause used in the action claim query.
    998992         *
    999          * @since 3.4.0
    1000          * @since 3.8.3 Made $claim_id and $hooks available.
    1001          *
    1002993         * @param string $order_by_sql
    1003994         * @param string $claim_id Claim Id.
    1004          * @param array  $hooks Hooks to filter for.
    1005          */
    1006         $order    = apply_filters( 'action_scheduler_claim_actions_order_by', 'ORDER BY priority ASC, attempts ASC, scheduled_date_gmt ASC, action_id ASC', $claim_id, $hooks );
    1007         $params[] = $limit;
    1008 
    1009         $sql           = $wpdb->prepare( "{$update} {$where} {$order} LIMIT %d", $params ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders
    1010         $rows_affected = $wpdb->query( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
     995         * @param array  $hooks    Hooks to filter for.
     996         *
     997         * @since 3.8.3 Made $claim_id and $hooks available.
     998         * @since 3.4.0
     999         */
     1000        $order       = apply_filters( 'action_scheduler_claim_actions_order_by', 'ORDER BY priority ASC, attempts ASC, scheduled_date_gmt ASC, action_id ASC', $claim_id, $hooks );
     1001        $skip_locked = $this->db_supports_skip_locked() ? ' SKIP LOCKED' : '';
     1002
     1003        // Selecting the action_ids that we plan to claim, while skipping any locked rows to avoid deadlocking.
     1004        $select_sql = $wpdb->prepare( "SELECT action_id from {$wpdb->actionscheduler_actions} {$where} {$order} LIMIT %d FOR UPDATE{$skip_locked}", array_merge( $where_params, array( $limit ) ) );
     1005
     1006        // Now place it into an UPDATE statement by joining the result sets, allowing for the SKIP LOCKED behavior to take effect.
     1007        $update_sql    = "UPDATE {$wpdb->actionscheduler_actions} t1 JOIN ( $select_sql ) t2 ON t1.action_id = t2.action_id SET claim_id=%d, last_attempt_gmt=%s, last_attempt_local=%s";
     1008        $update_params = array(
     1009            $claim_id,
     1010            $now->format( 'Y-m-d H:i:s' ),
     1011            current_time( 'mysql' ),
     1012        );
     1013
     1014        $rows_affected = $wpdb->query( $wpdb->prepare( $update_sql, $update_params ) );
    10111015        if ( false === $rows_affected ) {
    10121016            $error = empty( $wpdb->last_error )
    10131017                ? _x( 'unknown', 'database error', 'action-scheduler' )
    10141018                : $wpdb->last_error;
    1015 
    10161019            throw new \RuntimeException(
    10171020                sprintf(
     
    10271030
    10281031    /**
     1032     * Determines whether the database supports using SKIP LOCKED. This logic mimicks the $wpdb::has_cap() logic.
     1033     *
     1034     * SKIP_LOCKED support was added to MariaDB in 10.6.0 and to MySQL in 8.0.1
     1035     *
     1036     * @return bool
     1037     */
     1038    private function db_supports_skip_locked() {
     1039        global $wpdb;
     1040        $db_version     = $wpdb->db_version();
     1041        $db_server_info = $wpdb->db_server_info();
     1042        $is_mariadb     = ( false !== strpos( $db_server_info, 'MariaDB' ) );
     1043
     1044        if ( $is_mariadb &&
     1045             '5.5.5' === $db_version &&
     1046             PHP_VERSION_ID < 80016 // PHP 8.0.15 or older.
     1047        ) {
     1048            /*
     1049             * Account for MariaDB version being prefixed with '5.5.5-' on older PHP versions.
     1050             */
     1051            $db_server_info = preg_replace( '/^5\.5\.5-(.*)/', '$1', $db_server_info );
     1052            $db_version     = preg_replace( '/[^0-9.].*/', '', $db_server_info );
     1053        }
     1054
     1055        $is_supported = ( $is_mariadb && version_compare( $db_version, '10.6.0', '>=' ) ) ||
     1056                        ( ! $is_mariadb && version_compare( $db_version, '8.0.1', '>=' ) );
     1057
     1058        /**
     1059         * Filter whether the database supports the SKIP LOCKED modifier for queries.
     1060         *
     1061         * @param bool $is_supported Whether SKIP LOCKED is supported.
     1062         *
     1063         * @since 3.9.3
     1064         */
     1065        return apply_filters( 'action_scheduler_db_supports_skip_locked', $is_supported );
     1066    }
     1067
     1068    /**
    10291069     * Get the number of active claims.
    10301070     *
     
    10951135
    10961136    /**
    1097      * Release actions from a claim and delete the claim.
     1137     * Release pending actions from a claim and delete the claim.
    10981138     *
    10991139     * @param ActionScheduler_ActionClaim $claim Claim object.
     
    11071147         */
    11081148        global $wpdb;
     1149
     1150        if ( 0 === intval( $claim->get_id() ) ) {
     1151            // Verify that the claim_id is valid before attempting to release it.
     1152            return;
     1153        }
    11091154
    11101155        /**
     
    11141159         *
    11151160         * We resolve this by getting all the actions_id that we want to release claim from in a separate query, and then releasing the claim on each of them. This way, our lock is acquired on the action_id index instead of the claim_id index. Note that the lock on claim_id will still be acquired, but it will only when we actually make the update, rather than when we select the actions.
    1116          */
    1117         $action_ids = $wpdb->get_col( $wpdb->prepare( "SELECT action_id FROM {$wpdb->actionscheduler_actions} WHERE claim_id = %d", $claim->get_id() ) );
     1161         *
     1162         * We only release pending actions in order for them to be claimed by another process.
     1163         */
     1164        $action_ids = $wpdb->get_col( $wpdb->prepare( "SELECT action_id FROM {$wpdb->actionscheduler_actions} WHERE claim_id = %d AND status = %s", $claim->get_id(), self::STATUS_PENDING ) );
    11181165
    11191166        $row_updates = 0;
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php

    r3322331 r3379694  
    433433
    434434    /**
    435      * Release a claim in the table data store.
     435     * Release a claim in the table data store on any pending actions.
    436436     *
    437437     * @param ActionScheduler_ActionClaim $claim Claim object.
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php

    r3322331 r3379694  
    792792
    793793    /**
    794      * Release claim.
     794     * Release pending actions from a claim.
    795795     *
    796796     * @param ActionScheduler_ActionClaim $claim Claim object to release.
     
    799799     */
    800800    public function release_claim( ActionScheduler_ActionClaim $claim ) {
    801         $action_ids = $this->find_actions_by_claim_id( $claim->get_id() );
    802         if ( empty( $action_ids ) ) {
    803             return; // nothing to do.
    804         }
    805         $action_id_string = implode( ',', array_map( 'intval', $action_ids ) );
    806801        /**
    807802         * Global wpdb object.
     
    810805         */
    811806        global $wpdb;
     807
     808        $claim_id = $claim->get_id();
     809        if ( trim( $claim_id ) === '' ) {
     810            // Verify that the claim_id is valid before attempting to release it.
     811            return;
     812        }
     813
     814        // Only attempt to release pending actions to be claimed again. Running and complete actions are no longer relevant outside of admin/analytics.
     815        // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
     816        $action_ids = $wpdb->get_col(
     817            $wpdb->prepare(
     818                "SELECT ID, post_date_gmt FROM {$wpdb->posts} WHERE post_type = %s AND post_password = %s AND post_status = %s",
     819                self::POST_TYPE,
     820                $claim_id,
     821                self::STATUS_PENDING
     822            )
     823        );
     824
     825        if ( empty( $action_ids ) ) {
     826            return; // nothing to do.
     827        }
     828        $action_id_string = implode( ',', array_map( 'intval', $action_ids ) );
    812829
    813830        // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php

    r3322331 r3379694  
    2121     * @var int
    2222     */
    23     protected $schema_version = 7;
     23    protected $schema_version = 8;
    2424
    2525    /**
     
    8181                        KEY group_id (group_id),
    8282                        KEY last_attempt_gmt (last_attempt_gmt),
    83                         KEY `claim_id_status_scheduled_date_gmt` (`claim_id`, `status`, `scheduled_date_gmt`)
     83                        KEY `claim_id_status_priority_scheduled_date_gmt` (`claim_id`,`status`,`priority`,`scheduled_date_gmt`),
     84                        KEY `status_last_attempt_gmt` (`status`,`last_attempt_gmt`),
     85                        KEY `status_claim_id` (`status`,`claim_id`)
    8486                        ) $charset_collate";
    8587
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/functions.php

    r3322331 r3379694  
    8787     * @param string   $group      Action group.
    8888     * @param int      $priorities Action priority.
     89     * @param bool     $unique     Unique action.
    8990     */
    90     $pre = apply_filters( 'pre_as_schedule_single_action', null, $timestamp, $hook, $args, $group, $priority );
     91    $pre = apply_filters( 'pre_as_schedule_single_action', null, $timestamp, $hook, $args, $group, $priority, $unique );
    9192    if ( null !== $pre ) {
    9293        return is_int( $pre ) ? $pre : 0;
     
    160161     * @param string   $group               Action group.
    161162     * @param int      $priority            Action priority.
     163     * @param bool     $unique              Unique action.
    162164     */
    163     $pre = apply_filters( 'pre_as_schedule_recurring_action', null, $timestamp, $interval_in_seconds, $hook, $args, $group, $priority );
     165    $pre = apply_filters( 'pre_as_schedule_recurring_action', null, $timestamp, $interval_in_seconds, $hook, $args, $group, $priority, $unique );
    164166    if ( null !== $pre ) {
    165167        return is_int( $pre ) ? $pre : 0;
     
    226228     * @param string   $group      Action group.
    227229     * @param int      $priority   Action priority.
     230     * @param bool     $unique     Unique action.
    228231     */
    229     $pre = apply_filters( 'pre_as_schedule_cron_action', null, $timestamp, $schedule, $hook, $args, $group, $priority );
     232    $pre = apply_filters( 'pre_as_schedule_cron_action', null, $timestamp, $schedule, $hook, $args, $group, $priority, $unique );
    230233    if ( null !== $pre ) {
    231234        return is_int( $pre ) ? $pre : 0;
     
    494497    return $date;
    495498}
     499
     500/**
     501 * Check if a specific feature is supported by the current version of Action Scheduler.
     502 *
     503 * @since 3.9.3
     504 *
     505 * @param string $feature The feature to check support for.
     506 *
     507 * @return bool True if the feature is supported, false otherwise.
     508 */
     509function as_supports( string $feature ): bool {
     510    $supported_features = array( 'ensure_recurring_actions_hook' );
     511
     512    return in_array( $feature, $supported_features, true );
     513}
  • grocerslist/trunk/vendor/woocommerce/action-scheduler/readme.txt

    r3322331 r3379694  
    22Contributors: Automattic, wpmuguru, claudiosanches, peterfabian1000, vedjain, jamosova, obliviousharmony, konamiman, sadowski, royho, barryhughes-1
    33Tags: scheduler, cron
    4 Stable tag: 3.9.2
     4Stable tag: 3.9.3
    55License: GPLv3
    66Requires at least: 6.5
    7 Tested up to: 6.7
    8 Requires PHP: 7.1
     7Tested up to: 6.8
     8Requires PHP: 7.2
    99
    1010Action Scheduler - Job Queue for WordPress
     
    3030## Learn More
    3131
    32 To learn more about how to Action Scheduler works, and how to use it in your plugin, check out the docs on [ActionScheduler.org](https://actionscheduler.org).
     32To learn more about how Action Scheduler works, and how to use it in your plugin, check out the docs on [ActionScheduler.org](https://actionscheduler.org).
    3333
    3434There you will find:
     
    4747
    4848== Changelog ==
     49
     50= 3.9.3 - 2025-07-15 =
     51* Add hook 'action_scheduler_ensure_recurring_actions' specifically for scheduling recurring actions.
     52* Assume an action is valid until proven otherwise.
     53* Implement SKIP LOCKED during action claiming.
     54* Import `get_flag_value()` from `WP_CLI\Utils` before using.
     55* Make `$unique` available to all pre-creation/short-circuit hooks.
     56* Make version/source information available via new class.
     57* Only release claims on pending actions.
     58* Tweak - WP 6.8 compatibility.
     59* Update minimum supported php and phpunit versions.
     60* Update readme.txt.
     61* WP CLI get action command: correct parentheses/nesting of conditional checks.
    4962
    5063= 3.9.2 - 2025-02-03 =
Note: See TracChangeset for help on using the changeset viewer.