Plugin Directory

Changeset 3735480


Ignore:
Timestamp:
10/08/2026 08:32:48 PM (2 weeks ago)
Author:
rmoriar1
Message:

Update to version 1.1.0 from GitHub

Location:
gemini-enterprise-for-cx
Files:
100 added
30 deleted
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • gemini-enterprise-for-cx/tags/1.1.0/changelog.txt

    r3721834 r3735480  
    11*** Gemini Enterprise for CX Changelog ***
     2
     32026-10-08 - version 1.1.0
     4* Load the plugin's classes with a Composer autoloader, shipped in `vendor/`, under the `Google\Gemini_Enterprise_For_CX` namespace. The global `GECX_*` classes are removed without aliases, so code that referenced them must use the namespaced classes. No behavior changes.
     5* Build the admin, storefront and block editor scripts with the WordPress build tooling. They now load minified from `build/scripts/` instead of `assets/js/` (unminified when `SCRIPT_DEBUG` is on), with dependencies and versions taken from the generated asset files. Script handles are unchanged; if a caching or optimization plugin excludes `assets/js/storefront.js` by path, exclude `build/scripts/storefront/` instead.
     6* Make the settings page's error messages and the descriptions of the Launcher and Suggested Prompts blocks translatable, and translate the Suggested Prompts block label as a single string.
     7* Load translations for the admin, storefront and block editor scripts from WordPress.org language packs, and drop the bundled `languages/` folder and the `Domain Path` header.
     8* Declare compatibility with WooCommerce 11.2.
    29
    3102026-09-30 - version 1.0.1
  • gemini-enterprise-for-cx/tags/1.1.0/gecx-agent.php

    r3721834 r3735480  
    1515 * Requires at least: 6.2
    1616 * Requires PHP:     7.4
    17  * Version:          1.0.1
     17 * Version:          1.1.0
    1818 * Author:           Google LLC
    1919 * Author URI:       https://cloud.google.com/gemini
    … …  
    2121 * License URI:      https://www.gnu.org/licenses/gpl-3.0.html
    2222 * Text Domain:      gemini-enterprise-for-cx
    23  * Domain Path:      /languages
    2423 * WC requires at least: 7.1
    25  * WC tested up to: 11.1
     24 * WC tested up to: 11.2
    2625 */
    2726
    … …  
    3332
    3433if ( ! defined( 'GECX_VERSION' ) ) {
    35     define( 'GECX_VERSION', '1.0.1' );
     34    define( 'GECX_VERSION', '1.1.0' );
    3635}
    3736
    3837
    3938
    40 // Load core classes.
    41 require_once plugin_dir_path( __FILE__ ) . 'includes/class-gecx-auth.php';
    42 require_once plugin_dir_path( __FILE__ ) . 'includes/class-gecx-rest-api.php';
    43 require_once plugin_dir_path( __FILE__ ) . 'includes/class-gecx-admin.php';
    44 require_once plugin_dir_path( __FILE__ ) . 'includes/class-gecx-storefront.php';
     39// Load Composer autoloader.
     40if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
     41    require_once __DIR__ . '/vendor/autoload.php';
     42}
    4543
    4644// Register activation and deactivation hooks.
    47 register_activation_hook( __FILE__, [ 'GECX_Admin', 'activate_plugin' ] );
    48 register_deactivation_hook( __FILE__, [ 'GECX_Admin', 'deactivate_plugin' ] );
    49 
    50 /*
    51  * There is deliberately no load_plugin_textdomain() call here.
    52  *
    53  * Since WordPress 4.6 a plugin hosted on WordPress.org has its translations
    54  * loaded automatically, keyed on the plugin slug, and Plugin Check flags the
    55  * manual call as discouraged. It would also load nothing: the only thing this
    56  * plugin ships under /languages is the .pot template, which is a source for
    57  * translators rather than a catalogue WordPress can read.
    58  *
    59  * The 'Text Domain' and 'Domain Path' headers above are still required. They
    60  * are what WordPress.org keys translations on, and what wp_set_script_translations()
    61  * resolves JSON catalogues against for the admin and storefront bundles.
    62  */
     45register_activation_hook( __FILE__, [ Google\Gemini_Enterprise_For_CX\Admin::class, 'activate_plugin' ] );
     46register_deactivation_hook( __FILE__, [ Google\Gemini_Enterprise_For_CX\Admin::class, 'deactivate_plugin' ] );
    6347
    6448/**
    6549 * Initializes the plugin's components if WooCommerce is active.
    6650 *
    67  * Every component assumes WooCommerce: GECX_Rest_API hooks WooCommerce
    68  * filters and calls WC(), GECX_Storefront renders on WooCommerce templates,
    69  * GECX_Admin adds fields to the WooCommerce product editor, and GECX_Auth
     51 * Every component assumes WooCommerce: REST_API hooks WooCommerce
     52 * filters and calls WC(), Storefront renders on WooCommerce templates,
     53 * Admin adds fields to the WooCommerce product editor, and Auth
    7054 * authenticates WooCommerce Store API requests. The "Requires Plugins" header
    7155 * keeps WordPress from activating this plugin without WooCommerce, but that
    … …  
    8468    }
    8569
    86     new GECX_Auth();
    87     new GECX_Rest_API();
    88     new GECX_Admin( __FILE__ );
    89     new GECX_Storefront( __FILE__ );
     70    new Google\Gemini_Enterprise_For_CX\Auth();
     71    new Google\Gemini_Enterprise_For_CX\REST\REST_API();
     72    new Google\Gemini_Enterprise_For_CX\Admin( __FILE__ );
     73    new Google\Gemini_Enterprise_For_CX\Storefront( __FILE__ );
    9074}
    9175add_action( 'plugins_loaded', 'gecx_init_components' );
  • gemini-enterprise-for-cx/tags/1.1.0/readme.txt

    r3721834 r3735480  
    11=== Gemini Enterprise for CX ===
    22Contributors: google
    3 Tags: woocommerce, marketing, ai, agent, chatbot
     3Tags: woocommerce, ai, chatbot, ai agent, shopping assistant
    44Requires at least: 6.2
    55WC requires at least: 7.1
    6 WC tested up to: 11.1
     6WC tested up to: 11.2
    77Tested up to: 7.1
    88Requires PHP: 7.4
    9 Stable tag: 1.0.1
     9Stable tag: 1.1.0
    1010License: GPLv3
    1111License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1212
    13 Add an AI shopping agent from Google Cloud to your WooCommerce store. It answers product questions, gives advice and adds items to the cart.
     13AI shopping assistant and chatbot for your WooCommerce store, from Google Cloud. Answers product questions, gives advice and adds items to the cart.
    1414
    1515== Description ==
    1616
    17 Gemini Enterprise for CX connects your WooCommerce store to Google's Gemini Enterprise for CX (GECX) service. It adds a chat widget to your storefront where shoppers talk to an AI agent that knows your products and store policies and can add items to their cart.
     17Gemini Enterprise for CX adds an AI shopping assistant to your WooCommerce store. Shoppers open a chat widget on your storefront and talk to an AI agent that knows your products and store policies, answers their questions and manages their cart. The agent runs on Google's Gemini Enterprise for CX (GECX) service.
    1818
    1919The plugin is an interface to the Gemini Enterprise for CX software as a service (SaaS) provided by Google Cloud. Connecting a store requires a Google account with access to Gemini Enterprise for CX.
    … …  
    133133The complete release history is kept in changelog.txt at the plugin root.
    134134
     135= 1.1.0 =
     136* Load the plugin's classes with a Composer autoloader, shipped in `vendor/`, under the `Google\Gemini_Enterprise_For_CX` namespace. The global `GECX_*` classes are removed without aliases, so code that referenced them must use the namespaced classes. No behavior changes.
     137* Build the admin, storefront and block editor scripts with the WordPress build tooling. They now load minified from `build/scripts/` instead of `assets/js/` (unminified when `SCRIPT_DEBUG` is on), with dependencies and versions taken from the generated asset files. Script handles are unchanged; if a caching or optimization plugin excludes `assets/js/storefront.js` by path, exclude `build/scripts/storefront/` instead.
     138* Make the settings page's error messages and the descriptions of the Launcher and Suggested Prompts blocks translatable, and translate the Suggested Prompts block label as a single string.
     139* Load translations for the admin, storefront and block editor scripts from WordPress.org language packs, and drop the bundled `languages/` folder and the `Domain Path` header.
     140* Declare compatibility with WooCommerce 11.2.
     141
    135142= 1.0.1 =
    136143* Admin JWTs now last 60 minutes instead of 5, so a merchant who leaves the Gemini Enterprise for CX console to build an agent can still link it when they return.
  • gemini-enterprise-for-cx/tags/1.1.0/uninstall.php

    r3720294 r3735480  
    1010 */
    1111
     12use Google\Gemini_Enterprise_For_CX\Auth;
     13
    1214// If run outside of WordPress uninstallation, die.
    1315if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
    14     die;
     16        die;
    1517}
    1618
    … …  
    1820
    1921// WordPress loads uninstall.php standalone, so none of the plugin's classes are
    20 // autoloaded here. The uninstall notification is authenticated with a JWT signed
    21 // by the store's own private key, which means the auth class has to be pulled in
    22 // by hand before that key is deleted further down.
    23 if ( ! class_exists( 'GECX_Auth' ) && file_exists( __DIR__ . '/includes/class-gecx-auth.php' ) ) {
    24     require_once __DIR__ . '/includes/class-gecx-auth.php';
     22// autoloaded by default. Load Composer autoloader to access plugin classes.
     23if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
     24        require_once __DIR__ . '/vendor/autoload.php';
    2525}
    2626
    … …  
    6969        $gecx_agent_name  = get_option( 'gecx_agent_name', '' );
    7070        // Same allowlist as every other outbound call; '' means do not notify.
    71         $gecx_console_url = class_exists( 'GECX_Auth' ) ? GECX_Auth::get_console_base_url() : '';
     71        $gecx_console_url = class_exists( Auth::class ) ? Auth::get_console_base_url() : '';
    7272        $gecx_store_url   = function_exists( 'home_url' ) ? home_url() : '';
    7373
    … …  
    8585                } catch ( \Exception $e ) {
    8686                    // Uninstall must finish regardless, but record why the webhook survived.
    87                     if ( class_exists( 'GECX_Auth' ) ) {
    88                         GECX_Auth::log( 'Uninstall could not delete the stored webhook: ' . $e->getMessage(), 'debug' );
     87                    if ( class_exists( Auth::class ) ) {
     88                        Auth::log( 'Uninstall could not delete the stored webhook: ' . $e->getMessage(), 'debug' );
    8989                    }
    9090                }
    … …  
    106106                    }
    107107                } catch ( \Throwable $e ) {
    108                     if ( class_exists( 'GECX_Auth' ) ) {
    109                         GECX_Auth::log( 'Uninstall could not query webhooks: ' . $e->getMessage(), 'debug' );
     108                    if ( class_exists( Auth::class ) ) {
     109                        Auth::log( 'Uninstall could not query webhooks: ' . $e->getMessage(), 'debug' );
    110110                    }
    111111                }
    … …  
    173173
    174174        $gecx_jwt = '';
    175         if ( $gecx_was_connected && '' !== $gecx_console_url && class_exists( 'GECX_Auth' ) ) {
    176             $gecx_jwt = (string) GECX_Auth::generate_existing_rs256_admin_jwt();
     175        if ( $gecx_was_connected && '' !== $gecx_console_url && class_exists( Auth::class ) ) {
     176            $gecx_jwt = (string) Auth::generate_existing_rs256_admin_jwt();
    177177        }
    178178
    … …  
    198198
    199199            if ( $gecx_budget_spent ) {
    200                 if ( class_exists( 'GECX_Auth' ) ) {
    201                     GECX_Auth::log( 'Uninstall notification skipped for ' . $gecx_store_url . ': too little of the notification time budget remains to complete a request.', 'warning' );
     200                if ( class_exists( Auth::class ) ) {
     201                    Auth::log( 'Uninstall notification skipped for ' . $gecx_store_url . ': too little of the notification time budget remains to complete a request.', 'warning' );
    202202                }
    203203            } elseif ( 'https' === $gecx_scheme && ( function_exists( 'wp_http_validate_url' ) ? wp_http_validate_url( $gecx_webhook_url ) : filter_var( $gecx_webhook_url, FILTER_VALIDATE_URL ) ) ) {
    … …  
    207207                //
    208208                // wp_safe_remote_post() rather than wp_remote_post(), matching
    209                 // the two GECX_Admin_Console_Sync call sites: the destination comes from an
     209                // the two Admin\Console_Sync call sites: the destination comes from an
    210210                // option, so the resolved host is validated against the private
    211211                // and loopback ranges. redirection 0 because the request
    … …  
    231231        // Done after the notification above, which the backend may verify by
    232232        // fetching /wp-json/gecx/v1/public-key with those keys.
    233         if ( class_exists( 'GECX_Auth' ) ) {
    234             GECX_Auth::revoke_woocommerce_api_keys();
    235         }
    236         // Literal names: GECX_Auth is not guaranteed to be loaded here.
     233        if ( class_exists( Auth::class ) ) {
     234            Auth::revoke_woocommerce_api_keys();
     235        }
     236        // Literal names: Auth is not guaranteed to be loaded here.
    237237        delete_option( 'gecx_merchant_unlinked' );
    238238        delete_option( 'gecx_merchant_disabled' );
    … …  
    281281        if ( function_exists( 'delete_transient' ) ) {
    282282            delete_transient( 'gecx_admin_notice_error' );
    283             delete_transient( class_exists( 'GECX_Auth' ) && defined( 'GECX_Auth::GUEST_JWT_CACHE_TRANSIENT' ) ? GECX_Auth::GUEST_JWT_CACHE_TRANSIENT : 'gecx_guest_jwt_cache' );
     283            delete_transient( class_exists( Auth::class ) && defined( Auth::class . '::GUEST_JWT_CACHE_TRANSIENT' ) ? Auth::GUEST_JWT_CACHE_TRANSIENT : 'gecx_guest_jwt_cache' );
    284284        }
    285285
  • gemini-enterprise-for-cx/trunk/changelog.txt

    r3721834 r3735480  
    11*** Gemini Enterprise for CX Changelog ***
     2
     32026-10-08 - version 1.1.0
     4* Load the plugin's classes with a Composer autoloader, shipped in `vendor/`, under the `Google\Gemini_Enterprise_For_CX` namespace. The global `GECX_*` classes are removed without aliases, so code that referenced them must use the namespaced classes. No behavior changes.
     5* Build the admin, storefront and block editor scripts with the WordPress build tooling. They now load minified from `build/scripts/` instead of `assets/js/` (unminified when `SCRIPT_DEBUG` is on), with dependencies and versions taken from the generated asset files. Script handles are unchanged; if a caching or optimization plugin excludes `assets/js/storefront.js` by path, exclude `build/scripts/storefront/` instead.
     6* Make the settings page's error messages and the descriptions of the Launcher and Suggested Prompts blocks translatable, and translate the Suggested Prompts block label as a single string.
     7* Load translations for the admin, storefront and block editor scripts from WordPress.org language packs, and drop the bundled `languages/` folder and the `Domain Path` header.
     8* Declare compatibility with WooCommerce 11.2.
    29
    3102026-09-30 - version 1.0.1
  • gemini-enterprise-for-cx/trunk/gecx-agent.php

    r3721834 r3735480  
    1515 * Requires at least: 6.2
    1616 * Requires PHP:     7.4
    17  * Version:          1.0.1
     17 * Version:          1.1.0
    1818 * Author:           Google LLC
    1919 * Author URI:       https://cloud.google.com/gemini
    … …  
    2121 * License URI:      https://www.gnu.org/licenses/gpl-3.0.html
    2222 * Text Domain:      gemini-enterprise-for-cx
    23  * Domain Path:      /languages
    2423 * WC requires at least: 7.1
    25  * WC tested up to: 11.1
     24 * WC tested up to: 11.2
    2625 */
    2726
    … …  
    3332
    3433if ( ! defined( 'GECX_VERSION' ) ) {
    35     define( 'GECX_VERSION', '1.0.1' );
     34    define( 'GECX_VERSION', '1.1.0' );
    3635}
    3736
    3837
    3938
    40 // Load core classes.
    41 require_once plugin_dir_path( __FILE__ ) . 'includes/class-gecx-auth.php';
    42 require_once plugin_dir_path( __FILE__ ) . 'includes/class-gecx-rest-api.php';
    43 require_once plugin_dir_path( __FILE__ ) . 'includes/class-gecx-admin.php';
    44 require_once plugin_dir_path( __FILE__ ) . 'includes/class-gecx-storefront.php';
     39// Load Composer autoloader.
     40if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
     41    require_once __DIR__ . '/vendor/autoload.php';
     42}
    4543
    4644// Register activation and deactivation hooks.
    47 register_activation_hook( __FILE__, [ 'GECX_Admin', 'activate_plugin' ] );
    48 register_deactivation_hook( __FILE__, [ 'GECX_Admin', 'deactivate_plugin' ] );
    49 
    50 /*
    51  * There is deliberately no load_plugin_textdomain() call here.
    52  *
    53  * Since WordPress 4.6 a plugin hosted on WordPress.org has its translations
    54  * loaded automatically, keyed on the plugin slug, and Plugin Check flags the
    55  * manual call as discouraged. It would also load nothing: the only thing this
    56  * plugin ships under /languages is the .pot template, which is a source for
    57  * translators rather than a catalogue WordPress can read.
    58  *
    59  * The 'Text Domain' and 'Domain Path' headers above are still required. They
    60  * are what WordPress.org keys translations on, and what wp_set_script_translations()
    61  * resolves JSON catalogues against for the admin and storefront bundles.
    62  */
     45register_activation_hook( __FILE__, [ Google\Gemini_Enterprise_For_CX\Admin::class, 'activate_plugin' ] );
     46register_deactivation_hook( __FILE__, [ Google\Gemini_Enterprise_For_CX\Admin::class, 'deactivate_plugin' ] );
    6347
    6448/**
    6549 * Initializes the plugin's components if WooCommerce is active.
    6650 *
    67  * Every component assumes WooCommerce: GECX_Rest_API hooks WooCommerce
    68  * filters and calls WC(), GECX_Storefront renders on WooCommerce templates,
    69  * GECX_Admin adds fields to the WooCommerce product editor, and GECX_Auth
     51 * Every component assumes WooCommerce: REST_API hooks WooCommerce
     52 * filters and calls WC(), Storefront renders on WooCommerce templates,
     53 * Admin adds fields to the WooCommerce product editor, and Auth
    7054 * authenticates WooCommerce Store API requests. The "Requires Plugins" header
    7155 * keeps WordPress from activating this plugin without WooCommerce, but that
    … …  
    8468    }
    8569
    86     new GECX_Auth();
    87     new GECX_Rest_API();
    88     new GECX_Admin( __FILE__ );
    89     new GECX_Storefront( __FILE__ );
     70    new Google\Gemini_Enterprise_For_CX\Auth();
     71    new Google\Gemini_Enterprise_For_CX\REST\REST_API();
     72    new Google\Gemini_Enterprise_For_CX\Admin( __FILE__ );
     73    new Google\Gemini_Enterprise_For_CX\Storefront( __FILE__ );
    9074}
    9175add_action( 'plugins_loaded', 'gecx_init_components' );
  • gemini-enterprise-for-cx/trunk/readme.txt

    r3721834 r3735480  
    11=== Gemini Enterprise for CX ===
    22Contributors: google
    3 Tags: woocommerce, marketing, ai, agent, chatbot
     3Tags: woocommerce, ai, chatbot, ai agent, shopping assistant
    44Requires at least: 6.2
    55WC requires at least: 7.1
    6 WC tested up to: 11.1
     6WC tested up to: 11.2
    77Tested up to: 7.1
    88Requires PHP: 7.4
    9 Stable tag: 1.0.1
     9Stable tag: 1.1.0
    1010License: GPLv3
    1111License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1212
    13 Add an AI shopping agent from Google Cloud to your WooCommerce store. It answers product questions, gives advice and adds items to the cart.
     13AI shopping assistant and chatbot for your WooCommerce store, from Google Cloud. Answers product questions, gives advice and adds items to the cart.
    1414
    1515== Description ==
    1616
    17 Gemini Enterprise for CX connects your WooCommerce store to Google's Gemini Enterprise for CX (GECX) service. It adds a chat widget to your storefront where shoppers talk to an AI agent that knows your products and store policies and can add items to their cart.
     17Gemini Enterprise for CX adds an AI shopping assistant to your WooCommerce store. Shoppers open a chat widget on your storefront and talk to an AI agent that knows your products and store policies, answers their questions and manages their cart. The agent runs on Google's Gemini Enterprise for CX (GECX) service.
    1818
    1919The plugin is an interface to the Gemini Enterprise for CX software as a service (SaaS) provided by Google Cloud. Connecting a store requires a Google account with access to Gemini Enterprise for CX.
    … …  
    133133The complete release history is kept in changelog.txt at the plugin root.
    134134
     135= 1.1.0 =
     136* Load the plugin's classes with a Composer autoloader, shipped in `vendor/`, under the `Google\Gemini_Enterprise_For_CX` namespace. The global `GECX_*` classes are removed without aliases, so code that referenced them must use the namespaced classes. No behavior changes.
     137* Build the admin, storefront and block editor scripts with the WordPress build tooling. They now load minified from `build/scripts/` instead of `assets/js/` (unminified when `SCRIPT_DEBUG` is on), with dependencies and versions taken from the generated asset files. Script handles are unchanged; if a caching or optimization plugin excludes `assets/js/storefront.js` by path, exclude `build/scripts/storefront/` instead.
     138* Make the settings page's error messages and the descriptions of the Launcher and Suggested Prompts blocks translatable, and translate the Suggested Prompts block label as a single string.
     139* Load translations for the admin, storefront and block editor scripts from WordPress.org language packs, and drop the bundled `languages/` folder and the `Domain Path` header.
     140* Declare compatibility with WooCommerce 11.2.
     141
    135142= 1.0.1 =
    136143* Admin JWTs now last 60 minutes instead of 5, so a merchant who leaves the Gemini Enterprise for CX console to build an agent can still link it when they return.
  • gemini-enterprise-for-cx/trunk/uninstall.php

    r3720294 r3735480  
    1010 */
    1111
     12use Google\Gemini_Enterprise_For_CX\Auth;
     13
    1214// If run outside of WordPress uninstallation, die.
    1315if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
    14     die;
     16        die;
    1517}
    1618
    … …  
    1820
    1921// WordPress loads uninstall.php standalone, so none of the plugin's classes are
    20 // autoloaded here. The uninstall notification is authenticated with a JWT signed
    21 // by the store's own private key, which means the auth class has to be pulled in
    22 // by hand before that key is deleted further down.
    23 if ( ! class_exists( 'GECX_Auth' ) && file_exists( __DIR__ . '/includes/class-gecx-auth.php' ) ) {
    24     require_once __DIR__ . '/includes/class-gecx-auth.php';
     22// autoloaded by default. Load Composer autoloader to access plugin classes.
     23if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
     24        require_once __DIR__ . '/vendor/autoload.php';
    2525}
    2626
    … …  
    6969        $gecx_agent_name  = get_option( 'gecx_agent_name', '' );
    7070        // Same allowlist as every other outbound call; '' means do not notify.
    71         $gecx_console_url = class_exists( 'GECX_Auth' ) ? GECX_Auth::get_console_base_url() : '';
     71        $gecx_console_url = class_exists( Auth::class ) ? Auth::get_console_base_url() : '';
    7272        $gecx_store_url   = function_exists( 'home_url' ) ? home_url() : '';
    7373
    … …  
    8585                } catch ( \Exception $e ) {
    8686                    // Uninstall must finish regardless, but record why the webhook survived.
    87                     if ( class_exists( 'GECX_Auth' ) ) {
    88                         GECX_Auth::log( 'Uninstall could not delete the stored webhook: ' . $e->getMessage(), 'debug' );
     87                    if ( class_exists( Auth::class ) ) {
     88                        Auth::log( 'Uninstall could not delete the stored webhook: ' . $e->getMessage(), 'debug' );
    8989                    }
    9090                }
    … …  
    106106                    }
    107107                } catch ( \Throwable $e ) {
    108                     if ( class_exists( 'GECX_Auth' ) ) {
    109                         GECX_Auth::log( 'Uninstall could not query webhooks: ' . $e->getMessage(), 'debug' );
     108                    if ( class_exists( Auth::class ) ) {
     109                        Auth::log( 'Uninstall could not query webhooks: ' . $e->getMessage(), 'debug' );
    110110                    }
    111111                }
    … …  
    173173
    174174        $gecx_jwt = '';
    175         if ( $gecx_was_connected && '' !== $gecx_console_url && class_exists( 'GECX_Auth' ) ) {
    176             $gecx_jwt = (string) GECX_Auth::generate_existing_rs256_admin_jwt();
     175        if ( $gecx_was_connected && '' !== $gecx_console_url && class_exists( Auth::class ) ) {
     176            $gecx_jwt = (string) Auth::generate_existing_rs256_admin_jwt();
    177177        }
    178178
    … …  
    198198
    199199            if ( $gecx_budget_spent ) {
    200                 if ( class_exists( 'GECX_Auth' ) ) {
    201                     GECX_Auth::log( 'Uninstall notification skipped for ' . $gecx_store_url . ': too little of the notification time budget remains to complete a request.', 'warning' );
     200                if ( class_exists( Auth::class ) ) {
     201                    Auth::log( 'Uninstall notification skipped for ' . $gecx_store_url . ': too little of the notification time budget remains to complete a request.', 'warning' );
    202202                }
    203203            } elseif ( 'https' === $gecx_scheme && ( function_exists( 'wp_http_validate_url' ) ? wp_http_validate_url( $gecx_webhook_url ) : filter_var( $gecx_webhook_url, FILTER_VALIDATE_URL ) ) ) {
    … …  
    207207                //
    208208                // wp_safe_remote_post() rather than wp_remote_post(), matching
    209                 // the two GECX_Admin_Console_Sync call sites: the destination comes from an
     209                // the two Admin\Console_Sync call sites: the destination comes from an
    210210                // option, so the resolved host is validated against the private
    211211                // and loopback ranges. redirection 0 because the request
    … …  
    231231        // Done after the notification above, which the backend may verify by
    232232        // fetching /wp-json/gecx/v1/public-key with those keys.
    233         if ( class_exists( 'GECX_Auth' ) ) {
    234             GECX_Auth::revoke_woocommerce_api_keys();
    235         }
    236         // Literal names: GECX_Auth is not guaranteed to be loaded here.
     233        if ( class_exists( Auth::class ) ) {
     234            Auth::revoke_woocommerce_api_keys();
     235        }
     236        // Literal names: Auth is not guaranteed to be loaded here.
    237237        delete_option( 'gecx_merchant_unlinked' );
    238238        delete_option( 'gecx_merchant_disabled' );
    … …  
    281281        if ( function_exists( 'delete_transient' ) ) {
    282282            delete_transient( 'gecx_admin_notice_error' );
    283             delete_transient( class_exists( 'GECX_Auth' ) && defined( 'GECX_Auth::GUEST_JWT_CACHE_TRANSIENT' ) ? GECX_Auth::GUEST_JWT_CACHE_TRANSIENT : 'gecx_guest_jwt_cache' );
     283            delete_transient( class_exists( Auth::class ) && defined( Auth::class . '::GUEST_JWT_CACHE_TRANSIENT' ) ? Auth::GUEST_JWT_CACHE_TRANSIENT : 'gecx_guest_jwt_cache' );
    284284        }
    285285
Note: See TracChangeset for help on using the changeset viewer.