Plugin Directory

Changeset 3789568


Ignore:
Timestamp:
11/07/2026 12:49:24 PM (3 weeks ago)
Author:
bananasaging
Message:

Release 0.1.6: fix manual Store API totals when cart routes missing in admin.

Location:
cobalt-checkout-diagnostics
Files:
203 added
7 edited

Legend:

Unmodified
Added
Removed
  • cobalt-checkout-diagnostics/trunk/cobalt-checkout-diagnostics.php

    r3762965 r3789568  
    44 * Plugin URI:        https://cobaltbranchlabs.com/plugins/cobalt-checkout-diagnostics
    55 * Description:       Local, read-only cart and checkout diagnostics. Does not prove that a customer can complete payment.
    6  * Version:           0.1.5
     6 * Version:           0.1.6
    77 * Requires at least: 6.9
    88 * Requires PHP:      8.2
    … …  
    2323defined( 'ABSPATH' ) || exit;
    2424
    25 define( 'CHECKOUT_GUARD_VERSION', '0.1.5' );
     25define( 'CHECKOUT_GUARD_VERSION', '0.1.6' );
    2626define( 'CHECKOUT_GUARD_FILE', __FILE__ );
    2727define( 'CHECKOUT_GUARD_PATH', plugin_dir_path( __FILE__ ) );
  • cobalt-checkout-diagnostics/trunk/readme.txt

    r3762965 r3789568  
    77WC requires at least: 10.8
    88WC tested up to: 11.1
    9 Stable tag: 0.1.5
     9Stable tag: 0.1.6
    1010License: GPLv2 or later
    1111License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    112112== Changelog ==
    113113
     114= 0.1.6 =
     115
     116* Fixed manual checkout checks returning inconclusive Store API totals when WooCommerce cart routes were unavailable during admin execution.
     117
    114118= 0.1.5 =
    115119
    … …  
    154158== Upgrade Notice ==
    155159
     160= 0.1.6 =
     161
     162Fixes inconclusive Store API totals on manual Run checks when cart routes are unavailable in admin.
     163
    156164= 0.1.5 =
    157165
  • cobalt-checkout-diagnostics/trunk/src/Diagnostics/StoreApi/WooCommerceCheckoutTotalConsistencyRuntime.php

    r3702953 r3789568  
    2222
    2323        /**
    24          * @param CartProductPlanner $planner    Product add planner.
    25          * @param string|null        $wc_abspath Optional WooCommerce root for tests.
     24         * @param CartProductPlanner     $planner         Product add planner.
     25         * @param string|null            $wc_abspath      Optional WooCommerce root for tests.
     26         * @param StoreApiRouteRegistrar $route_registrar Ensures Store API routes in admin probes.
    2627         */
    2728        public function __construct(
    2829                private CartProductPlanner $planner = new CartProductPlanner(),
    29                 private ?string $wc_abspath = null
     30                private ?string $wc_abspath = null,
     31                private StoreApiRouteRegistrar $route_registrar = new StoreApiRouteRegistrar()
    3032        ) {}
    3133
    … …  
    291293         * Internal Store API cart request. Return is mixed so stubs that disagree
    292294         * on WP_Error vs WP_REST_Response do not break analysis.
     295         *
     296         * Ensures the Store API cart route is registered first: WooCommerce skips
     297         * StoreApi::init() in admin, so unmodified admin-post runs otherwise 404.
     298         * Registration is deferred onto rest_api_init when it has not yet run
     299         * (WordPress _doing_it_wrong fires only when registering *before*
     300         * rest_api_init). Failed registration still yields a real REST response
     301         * that StoreApiCartSample interprets as non-ok → inconclusive, never pass.
    293302         */
    294303        private function request_store_api_cart(): mixed {
    … …  
    296305                        return null;
    297306                }
     307
     308                $this->route_registrar->ensure_registered();
    298309
    299310                return rest_do_request( new \WP_REST_Request( 'GET', '/wc/store/v1/cart' ) );
  • cobalt-checkout-diagnostics/trunk/third-party-licenses.txt

    r3762965 r3789568  
    1 Cobalt Checkout Diagnostics for WooCommerce 0.1.5 third-party license inventory
     1Cobalt Checkout Diagnostics for WooCommerce 0.1.6 third-party license inventory
    22==============================================================
    33
  • cobalt-checkout-diagnostics/trunk/vendor/composer/autoload_classmap.php

    r3762965 r3789568  
    102102    'WooCheckoutGuard\\Diagnostics\\StoreApi\\CheckoutTotalProbeResult' => $baseDir . '/src/Diagnostics/StoreApi/CheckoutTotalProbeResult.php',
    103103    'WooCheckoutGuard\\Diagnostics\\StoreApi\\StoreApiCartSample' => $baseDir . '/src/Diagnostics/StoreApi/StoreApiCartSample.php',
     104    'WooCheckoutGuard\\Diagnostics\\StoreApi\\StoreApiRouteRegistrar' => $baseDir . '/src/Diagnostics/StoreApi/StoreApiRouteRegistrar.php',
    104105    'WooCheckoutGuard\\Diagnostics\\StoreApi\\WooCommerceCheckoutTotalConsistencyRuntime' => $baseDir . '/src/Diagnostics/StoreApi/WooCommerceCheckoutTotalConsistencyRuntime.php',
    105106    'WooCheckoutGuard\\Diagnostics\\StoreStateReader' => $baseDir . '/src/Diagnostics/StoreStateReader.php',
  • cobalt-checkout-diagnostics/trunk/vendor/composer/autoload_static.php

    r3762965 r3789568  
    117117        'WooCheckoutGuard\\Diagnostics\\StoreApi\\CheckoutTotalProbeResult' => __DIR__ . '/../..' . '/src/Diagnostics/StoreApi/CheckoutTotalProbeResult.php',
    118118        'WooCheckoutGuard\\Diagnostics\\StoreApi\\StoreApiCartSample' => __DIR__ . '/../..' . '/src/Diagnostics/StoreApi/StoreApiCartSample.php',
     119        'WooCheckoutGuard\\Diagnostics\\StoreApi\\StoreApiRouteRegistrar' => __DIR__ . '/../..' . '/src/Diagnostics/StoreApi/StoreApiRouteRegistrar.php',
    119120        'WooCheckoutGuard\\Diagnostics\\StoreApi\\WooCommerceCheckoutTotalConsistencyRuntime' => __DIR__ . '/../..' . '/src/Diagnostics/StoreApi/WooCommerceCheckoutTotalConsistencyRuntime.php',
    120121        'WooCheckoutGuard\\Diagnostics\\StoreStateReader' => __DIR__ . '/../..' . '/src/Diagnostics/StoreStateReader.php',
  • cobalt-checkout-diagnostics/trunk/vendor/composer/installed.php

    r3762965 r3789568  
    22    'root' => array(
    33        'name' => 'bananasaging/cobalt-checkout-diagnostics',
    4         'pretty_version' => '0.1.5',
    5         'version' => '0.1.5.0',
     4        'pretty_version' => '0.1.6',
     5        'version' => '0.1.6.0',
    66        'reference' => null,
    77        'type' => 'wordpress-plugin',
    … …  
    1212    'versions' => array(
    1313        'bananasaging/cobalt-checkout-diagnostics' => array(
    14             'pretty_version' => '0.1.5',
    15             'version' => '0.1.5.0',
     14            'pretty_version' => '0.1.6',
     15            'version' => '0.1.6.0',
    1616            'reference' => null,
    1717            'type' => 'wordpress-plugin',
Note: See TracChangeset for help on using the changeset viewer.