Plugin Directory

Changeset 3362678


Ignore:
Timestamp:
09/16/2025 04:19:31 PM (5 months ago)
Author:
patternsinthecloud
Message:

version 2.10.3

Location:
autoship-cloud/trunk
Files:
25 added
22 edited

Legend:

Unmodified
Added
Removed
  • autoship-cloud/trunk/app/Core/FeatureManager.php

    r3352156 r3362678  
    3434        'quicklaunch_display_beacon'           => true,
    3535        'product_sync'                         => true,
    36         'nextime'                              => false,
     36        'nextime'                              => true,
    3737        'quicklaunch_phone_required'           => true,
    3838    );
  • autoship-cloud/trunk/app/Domain/Nextime/NextimeShippingCalculator.php

    r3352156 r3362678  
    1010namespace Autoship\Domain\Nextime;
    1111
     12use Autoship\Core\Plugin;
    1213use Autoship\Services\Logging\Logger;
     14use Autoship\Services\Nextime\Carriers\ShippingOptionsRequest;
     15use Autoship\Services\Nextime\Carriers\ShippingOptionsRequestItem;
     16use Autoship\Services\Nextime\NextimeServiceInterface;
     17use Autoship\Services\Nextime\NextimeSettingsInterface;
     18use Throwable;
    1319use WC_Shipping_Method;
    1420
     
    3440     */
    3541    public float $default_cost;
     42
     43    /**
     44     * The default format of the delivery date.
     45     *
     46     * @var string
     47     */
     48    public string $default_format;
    3649
    3750    /**
     
    6982    private function init_instance_form_fields(): void {
    7083        $fields = array(
    71             'title'        => array(
     84            'title'          => array(
    7285                'title'       => __( 'Method Title', 'autoship' ),
    7386                'type'        => 'text',
     
    7689                'desc_tip'    => true,
    7790            ),
    78             'default_cost' => array(
     91            'default_cost'   => array(
    7992                'title'             => __( 'Default Shipping Cost', 'autoship' ),
    8093                'type'              => 'number',
     
    87100                ),
    88101            ),
     102            'default_format' => array(
     103                'title'       => __( 'Delivery Date Format ', 'autoship' ),
     104                'type'        => 'text',
     105                'description' => __( 'Date format to be displayed at checkout.', 'autoship' ),
     106                'default'     => 'l, F dS Y',
     107                'desc_tip'    => true,
     108            ),
    89109        );
    90110
     
    103123        $this->init_instance_form_fields();
    104124
    105         // Retrieve the keys from the Autoship Nextime settings.
    106         $api_key = get_option( 'autoship_nextime_api_key', '' );
    107         $site_id = get_option( 'autoship_nextime_site_id', '0' );
    108 
    109         // Get settings.
    110         $this->title        = $this->get_option( 'title' );
    111         $this->api_key      = $api_key;
    112         $this->default_cost = floatval( $this->get_option( 'default_cost', 200 ) );
    113         $this->site_id      = intval( $site_id, 0 );
     125        $this->title          = $this->get_option( 'title' );
     126        $this->default_cost   = floatval( $this->get_option( 'default_cost', 0 ) );
     127        $this->default_format = $this->get_option( 'default_format', 'l, F dS Y' );
     128
     129        $this->site_id = 0;
     130        $this->api_key = '';
     131
     132        // Get the Nextime settings.
     133        try {
     134            $container = Plugin::get_service_container();
     135            $settings  = $container->get( NextimeSettingsInterface::class );
     136            if ( $settings instanceof NextimeSettingsInterface ) {
     137                $this->api_key = $settings->get_site_token();
     138                $this->site_id = $settings->get_site_id();
     139            } else {
     140                Logger::log( 'Autoship Nextime Extension', 'Unable to retrieve Nextime settings.' );
     141            }
     142        } catch ( Throwable $e ) {
     143            Logger::log( 'Autoship Nextime Extension', 'Unable to retrieve Nextime settings.' );
     144        }
    114145    }
    115146
     
    118149     *
    119150     * @param array $package The package to get the shipping rate.
     151     *
    120152     * @return void
    121153     */
    122154    public function calculate_shipping( $package = array() ): void {
     155        try {
     156            $container = Plugin::get_service_container();
     157            $nextime   = $container->get( NextimeServiceInterface::class );
     158            if ( ! ( $nextime instanceof NextimeServiceInterface ) ) {
     159                Logger::log( 'Autoship Nextime Extension', 'Unable to retrieve Nextime service. Using default rate.' );
     160
     161                $this->add_default_rate();
     162                return;
     163            }
     164        } catch ( Throwable $e ) {
     165            Logger::log( 'Autoship Nextime Extension', 'Unable to retrieve Nextime service. Using default rate.' );
     166
     167            $this->add_default_rate();
     168            return;
     169        }
    123170
    124171        // Verify the required information for the Nextime request.
    125172        if ( empty( $this->site_id ) ) {
    126             Logger::log( __( 'Autoship Nextime Extension', 'autoship' ), __( 'The Nextime Site ID is missing.', 'autoship' ) );
    127 
    128             $this->add_default_rate();
    129             return;
    130         }
    131 
    132         if ( empty( $this->api_key ) ) {
    133             Logger::log( __( 'Autoship Nextime Extension', 'autoship' ), __( 'The Nextime Shipping API Key is missing.', 'autoship' ) );
     173            Logger::log( 'Autoship Nextime Extension', 'The Nextime Site ID is missing. Using default rate.' );
    134174
    135175            $this->add_default_rate();
     
    144184        if ( empty( $country ) || empty( $postal ) ) {
    145185            Logger::log(
    146                 __( 'Autoship Nextime Extension', 'autoship' ),
     186                'Autoship Nextime Extension',
    147187                sprintf(
    148                 // translators: The country value is %1$s, and the postal code value is %2$s.
    149                     __( 'Unable to calculate shipping rate due an invalid country (%1$s) or postal code (%2$s) values.', 'autoship' ),
     188                    // translators: The country value is %1$s, and the postal code value is %2$s.
     189                    'Unable to calculate shipping rate due an invalid country (%1$s) or postal code (%2$s) values. Using default rate.',
    150190                    $country,
    151191                    $postal
     
    157197        }
    158198
    159         // Build request information with required fields first.
    160         $destination = array(
    161             'country'     => $country,
    162             'postal_code' => $postal,
    163         );
     199        // Generates a random order ID.
     200        $order_id = str_shuffle( md5( microtime() ) );
     201
     202        $request = new ShippingOptionsRequest( $order_id, $postal, $country );
    164203
    165204        // Add optional fields only if they exist and are non‐empty.
    166205        if ( ! empty( $package['destination']['state'] ) ) {
    167             $destination['state'] = trim( $package['destination']['state'] );
     206            $request->set_state( trim( $package['destination']['state'] ) );
    168207        }
    169208
    170209        if ( ! empty( $package['destination']['city'] ) ) {
    171             $destination['city'] = trim( $package['destination']['city'] );
     210            $request->set_city( trim( $package['destination']['city'] ) );
    172211        }
    173212
    174213        if ( ! empty( $package['destination']['address'] ) ) {
    175             $destination['street'] = trim( $package['destination']['address'] );
     214            $request->set_street( trim( $package['destination']['address'] ) );
    176215        }
    177216
    178217        if ( ! empty( $package['destination']['address_2'] ) ) {
    179             $destination['street2'] = trim( $package['destination']['address_2'] );
    180         }
    181 
    182         $body = array(
    183             'rate' => array(
    184                 'destination' => $destination,
    185             ),
    186         );
    187 
    188         $args = array(
    189             'headers' => array(
    190                 'nextime-apikey' => $this->api_key,
    191                 'Content-Type'   => 'application/json',
    192                 'Accept'         => 'application/json',
    193             ),
    194             'body'    => wp_json_encode( $body ),
    195             'timeout' => 30,
    196         );
    197 
    198         $endpoint = "https://api.nextime.ai/$this->site_id/carrier-service/shipping-options";
    199         $response = wp_remote_post( $endpoint, $args );
    200         $date     = date_i18n( 'Y-m-d H:i:s' );
    201         $rates    = array();
    202 
    203         // Parse API response.
    204         if ( ! is_wp_error( $response ) ) {
    205             $data = json_decode( wp_remote_retrieve_body( $response ), true );
    206             if ( isset( $data['rates'] ) && is_array( $data['rates'] ) ) {
    207                 $rates = $data['rates'];
    208             }
    209         }
     218            $request->set_street2( trim( $package['destination']['address_2'] ) );
     219        }
     220
     221        if ( ! empty( $package['contents'] ) && is_array( $package['contents'] ) ) {
     222            $product_id = 1;
     223            foreach ( $package['contents'] as $item ) {
     224
     225                $request_item = new ShippingOptionsRequestItem();
     226                $request_item->set_id( $product_id );
     227                $request_item->set_product_id( $item['product_id'] );
     228                $request_item->set_quantity( $item['quantity'] );
     229                $request_item->set_regular_price( $item['line_total'] );
     230                $request_item->set_sale_price( $item['line_total'] );
     231
     232                $request->add_item( $request_item );
     233
     234                ++$product_id;
     235            }
     236        }
     237
     238        $response = $nextime->get_shipping_options( $request );
     239
     240        // Gets the shipping rate from the response.
     241        $rate = $response->get_shipping_rate();
     242        if ( null === $rate ) {
     243            Logger::log( 'Autoship Nextime Extension', 'There was an error while retrieving rates from Nextime. The shipping rate is not available. Using default rate.' );
     244            $this->add_default_rate();
     245            return;
     246        }
     247
     248        // Checks if the rate was successful.
     249        if ( true !== $rate->get_succeeded() ) {
     250            Logger::log( 'Autoship Nextime Extension', 'There was an error while retrieving rates from Nextime, using default rate.' );
     251            $errors = $rate->get_errors();
     252            if ( ! empty( $errors ) ) {
     253                foreach ( $errors as $error ) {
     254                    Logger::log( 'Autoship Nextime Extension', $error );
     255                }
     256            }
     257            $this->add_default_rate();
     258            return;
     259        }
     260
     261        $options = $rate->get_shipping_options();
     262        if ( null === $options ) {
     263            $this->add_default_rate();
     264            return;
     265        }
     266
     267        $date       = gmdate( 'Y-m-d H:i:s' );
     268        $deliveries = $options->get_delivery_dates();
    210269
    211270        // If rates returned, add each; otherwise fallback.
    212         if ( empty( $rates ) ) {
    213 
    214             Logger::log( __( 'Autoship Nextime Extension', 'autoship' ), __( 'The Nextime Shipping API Key is missing.', 'autoship' ) );
    215 
    216             $this->add_default_rate();
    217             return;
    218         }
    219 
    220         foreach ( $rates as $index => $option ) {
    221             // Parse the rates.
    222             $service_name      = "{$option['service_name']} ({$option['description']})";
    223             $total_price_cents = isset( $option['total_price'] ) ? intval( $option['total_price'] ) : intval( $this->default_cost * 100 );
    224             $cost              = $total_price_cents / 100;
    225 
    226             // Decode the service_code as the JSON string.
    227             $parsed_code = array();
    228             if ( isset( $option['service_code'] ) ) {
    229                 $raw_code = $option['service_code'];
    230                 // The API is returning service_code as a JSON‐encoded string.
    231                 $decoded = json_decode( $raw_code, true );
    232                 if ( is_array( $decoded ) ) {
    233                     $parsed_code = $decoded;
    234                 }
    235             }
    236 
    237             // Build the meta_data array, injecting both the generic fields and those extracted from service_code.
     271        if ( empty( $deliveries ) ) {
     272            Logger::log( 'Autoship Nextime Extension', 'There are no available rates from Nextime. Using default rate.' );
     273
     274            $this->add_default_rate();
     275            return;
     276        }
     277
     278        $counter = 1;
     279        foreach ( $deliveries as $delivery ) {
     280            if ( ! $delivery instanceof DeliveryDate ) {
     281                Logger::log( 'Autoship Nextime Extension', 'The expected delivery date is not valid. Looking for more.' );
     282                continue;
     283            }
     284
     285            // If we have 2 rates, we can stop.
     286            if ( $counter > 2 ) {
     287                break;
     288            }
     289
     290            $lines = $delivery->get_shipping_lines();
     291            if ( empty( $lines ) ) {
     292                Logger::log( 'Autoship Nextime Extension', 'The expected shipping lines are not valid. Looking for more.' );
     293                continue;
     294            }
     295
     296            $line = $lines[0];
     297            if ( ! $line instanceof ShippingLine ) {
     298                Logger::log( 'Autoship Nextime Extension', 'The expected shipping line is not valid. Looking for more.' );
     299                continue;
     300            }
     301
     302            // Build the meta_data array.
    238303            $meta_data = array(
    239                 '_Nextime_Calculated_Date'   => $date,
    240                 '_Nextime_Delivery_Date'     => $parsed_code['DeliveryDate'] ?? '',
    241                 '_Nextime_Charge_Date'       => $parsed_code['ChargeDate'] ?? '',
    242                 '_Nextime_Ship_Date'         => $parsed_code['ShipDate'] ?? '',
    243                 '_Nextime_Shipping_Method'   => $parsed_code['ShippingMethod'] ?? '',
    244                 '_Nextime_Shipping_Name'     => $parsed_code['Name'] ?? '',
    245                 '_Nextime_Shipping_Total'    => $parsed_code['Total'] ?? '',
    246                 '_Nextime_Description'       => $option['description'] ?? '',
    247                 '_Nextime_Currency'          => $option['currency'] ?? '',
    248                 '_Nextime_Min_Delivery_Date' => $option['minDeliveryDate'] ?? '',
    249                 '_Nextime_Max_Delivery_Date' => $option['maxDeliveryDate'] ?? '',
     304                '_Nextime_Calculated_Date' => $date,
     305                '_Nextime_Delivery_Date'   => $delivery->get_delivery_date() ?? '',
     306                '_Nextime_Charge_Date'     => $line->get_next_order_date() ?? '',
     307                '_Nextime_Ship_Date'       => $line->get_next_shipping_date() ?? '',
     308                '_Nextime_Shipping_Method' => $line->get_shipping_method() ?? '',
     309                '_Nextime_Shipping_Name'   => $line->get_name() ?? '',
     310                '_Nextime_Shipping_Total'  => $line->get_total() ?? '',
    250311            );
    251312
    252313            $rate = array(
    253                 'id'        => $this->id . '_' . $index,
    254                 'label'     => $service_name,
    255                 'cost'      => $cost,
     314                'id'        => $this->id . '_' . $counter,
     315                'label'     => "{$line->get_name()} ({$delivery->get_formatted_delivery_date( $this->default_format )})",
     316                'cost'      => $line->get_total(),
    256317                'meta_data' => $meta_data,
    257318            );
    258319
    259320            $this->add_rate( $rate );
     321
     322            ++$counter;
    260323        }
    261324    }
  • autoship-cloud/trunk/app/Modules/Nextime/NextimeModule.php

    r3352156 r3362678  
    99namespace Autoship\Modules\Nextime;
    1010
     11use Autoship\Core\Environment;
    1112use Autoship\Core\ModuleInterface;
     13use Autoship\Core\Plugin;
    1214use Autoship\Core\ServiceContainer;
    1315use Autoship\Services\Logging\Logger;
     16use Autoship\Services\Nextime\Implementations\NextimeCarriersManagement;
     17use Autoship\Services\Nextime\Implementations\NextimeSitesManagement;
     18use Autoship\Services\Nextime\Implementations\WordPressNextimeHttpClient;
     19use Autoship\Services\Nextime\Implementations\WordPressNextimeSettings;
     20use Autoship\Services\Nextime\Interfaces\CarriersManagementInterface;
     21use Autoship\Services\Nextime\Interfaces\SitesManagementInterface;
     22use Autoship\Services\Nextime\NextimeHttpClientInterface;
     23use Autoship\Services\Nextime\NextimeServiceClient;
     24use Autoship\Services\Nextime\NextimeServiceInterface;
     25use Autoship\Services\Nextime\NextimeSettingsInterface;
    1426use Exception;
    1527
     
    3951     */
    4052    public function register( ServiceContainer $container ) {
     53
     54        // Register the Nextime settings.
     55        $container->register(
     56            NextimeSettingsInterface::class,
     57            function () {
     58                $environment = new Environment();
     59
     60                return new WordPressNextimeSettings( $environment );
     61            }
     62        );
     63
     64        // Register the Nextime HTTP client.
     65        $container->register(
     66            NextimeHttpClientInterface::class,
     67            function () {
     68                $container = Plugin::get_service_container();
     69                $settings  = $container->get( NextimeSettingsInterface::class );
     70
     71                return new WordPressNextimeHttpClient( $settings );
     72            }
     73        );
     74
     75        // Register the Nextime sites management service.
     76        $container->register(
     77            SitesManagementInterface::class,
     78            function () {
     79                $environment = new Environment();
     80                return new NextimeSitesManagement( $environment );
     81            }
     82        );
     83
     84        // Register the Nextime carriers management service.
     85        $container->register(
     86            CarriersManagementInterface::class,
     87            function () {
     88                $container = Plugin::get_service_container();
     89                $client    = $container->get( NextimeHttpClientInterface::class );
     90
     91                return new NextimeCarriersManagement( $client );
     92            }
     93        );
     94
     95        // Register the Nextime API Service client.
     96        $container->register(
     97            NextimeServiceInterface::class,
     98            function () {
     99                $container = Plugin::get_service_container();
     100                $settings  = $container->get( NextimeSettingsInterface::class );
     101                $sites     = $container->get( SitesManagementInterface::class );
     102                $carriers  = $container->get( CarriersManagementInterface::class );
     103
     104                return new NextimeServiceClient( $settings, $sites, $carriers );
     105            }
     106        );
     107
    41108        $container->register(
    42109            NextimeService::class,
    43110            function () {
    44                 return new NextimeService();
     111                $container = Plugin::get_service_container();
     112                $settings  = $container->get( NextimeSettingsInterface::class );
     113                $nextime   = $container->get( NextimeServiceInterface::class );
     114
     115                return new NextimeService( $settings, $nextime );
    45116            }
    46117        );
     
    58129            $this->service = $container->get( NextimeService::class );
    59130
     131            $enabled = $this->service->is_nextime_enabled();
     132            if ( $enabled ) {
     133                $this->service->initialize();
     134            }
    60135        } catch ( Exception $exception ) {
    61             Logger::log(
    62                 __( 'Autoship Nextime Exception', 'autoship' ),
    63                 // translators: %s is the exception message.
    64                 sprintf( 'An exception occurred when attempting to boot the Nextime Module. Details: %s', $exception->getMessage() )
    65             );
     136            Logger::log( 'Autoship Nextime', 'Unable to retrieve Nextime service.' );
    66137        }
    67138    }
  • autoship-cloud/trunk/app/Modules/Nextime/NextimeService.php

    r3352156 r3362678  
    1212use Autoship\Core\Environment;
    1313use Autoship\Services\Logging\Logger;
     14use Autoship\Services\Nextime\NextimeServiceInterface;
     15use Autoship\Services\Nextime\NextimeSettingsInterface;
     16use Exception;
    1417use WC_Order;
    1518
     
    2225 */
    2326class NextimeService {
     27
     28    /**
     29     * The Nextime settings.
     30     *
     31     * @var NextimeSettingsInterface
     32     */
     33    private NextimeSettingsInterface $settings;
     34
     35    /**
     36     * The Nextime service.
     37     *
     38     * @var NextimeServiceInterface
     39     */
     40    private NextimeServiceInterface $nextime;
     41
     42    /**
     43     * Indicates whether the Nextime service has been initialized.
     44     *
     45     * @var bool
     46     */
     47    private static bool $initialized = false;
     48
    2449    /**
    2550     * Initialize the plugin by setting up dependencies, locale, admin, and public hooks.
    26      */
    27     public function __construct() {
     51     *
     52     * @param NextimeSettingsInterface $settings The Nextime settings.
     53     * @param NextimeServiceInterface  $nextime The Nextime service.
     54     */
     55    public function __construct( NextimeSettingsInterface $settings, NextimeServiceInterface $nextime ) {
     56        $this->settings = $settings;
     57        $this->nextime  = $nextime;
     58    }
     59
     60    /**
     61     * Initializes the Nextime service.
     62     *
     63     * @return void
     64     */
     65    public function initialize(): void {
     66        if ( self::$initialized ) {
     67            return;
     68        }
     69
     70        // This action creates the shipping method in WooCommerce.
    2871        add_action( 'woocommerce_shipping_init', array( $this, 'create_shipping_method' ) );
     72
     73        // This action copies the Nextime metadata from the shipping line to the order.
    2974        add_action( 'woocommerce_checkout_order_processed', array( $this, 'nextime_copy_all_shipping_meta_to_order' ), 10 );
    30         add_action( 'woocommerce_store_api_checkout_order_processed', array( $this, 'nextime_copy_all_shipping_meta_to_order' ), 10, 2 );
     75        add_action( 'woocommerce_store_api_checkout_order_processed', array( $this, 'nextime_copy_all_shipping_meta_to_order' ), 10 );
     76
     77        // This action enqueues the Nextime WooCommerce blocks script to display dates in a new line.
     78        add_action( 'enqueue_block_assets', array( $this, 'enqueue_nextime_woocommerce_blocks_script' ) );
     79
     80        // This filter appends the Nextime metadata into the scheduled order data to send to QPilot if it exists.
    3181        add_filter( 'woocommerce_scheduled_order_data', array( $this, 'add_nextime_meta_to_scheduled_order_data' ), 10, 2 );
     82
     83        // This filter appends the Nextime metadata into the scheduled order data to send to QPilot if it exists.
     84        add_filter( 'autoship_create_scheduled_order_data', array( $this, 'add_nextime_meta_to_scheduled_order_data' ), 10, 2 );
    3285
    3386        // Add Nextime to available shipping methods.
    3487        add_filter( 'woocommerce_shipping_methods', array( $this, 'add_nextime_shipping_method' ) );
    3588
    36         // This filter appends the Nextime metadata into the scheduled order data to send to QPilot if it exists.
    37         add_filter( 'autoship_create_scheduled_order_data', array( $this, 'add_nextime_meta_to_scheduled_order_data' ), 10, 2 );
    38 
    39         add_filter( 'autoship_admin_settings_tabs', array( $this, 'add_nextime_settings_tab' ), 10, 2 );
    40         add_filter( 'autoship_registered_admin_settings', array( $this, 'register_nextime_admin_settings' ), 10 );
    41         add_filter( 'autoship_registered_admin_setting_field_ids', array( $this, 'register_nextime_admin_settings_field_ids' ), 10 );
    42 
    43         add_action( 'enqueue_block_assets', array( $this, 'enqueue_nextime_woocommerce_blocks_script' ) );
     89        self::$initialized = true;
    4490    }
    4591
     
    72118     * copy _Nextime_… stuff from each shipping line to the order.
    73119     *
    74      * @param WC_Order $order    The order object being created.
    75      */
    76     public function nextime_copy_all_shipping_meta_to_order( WC_Order $order ): void {
    77         // Get all shipping items on this order.
     120     * @param mixed $order_id    The order object being created.
     121     */
     122    public function nextime_copy_all_shipping_meta_to_order( $order_id ): void {
     123
     124        if ( $order_id instanceof WC_Order ) {
     125            $order = $order_id;
     126        } else {
     127            $order = wc_get_order( $order_id );
     128            if ( ! $order ) {
     129                Logger::log( 'Autoship Nextime', "Unable to copy the shipping metadata to the WooCommerce order before sending it to QPilot. The input data is: $order_id" );
     130
     131                return;
     132            }
     133        }
     134
     135        if ( ! ( $order instanceof WC_Order ) ) {
     136            Logger::log( 'Autoship Nextime', "Unable to validate the WooCommerce order to copy the metadata from Nextime before sending it to QPilot. The input data is: $order_id" );
     137
     138            return;
     139        }
     140
     141        // Get all shipping items in this order.
    78142        $shipping_items = $order->get_items( 'shipping' );
    79143
     
    102166                '_Nextime_Shipping_Total',
    103167                '_Nextime_Calculated_Date',
    104                 '_Nextime_Currency',
    105                 '_Nextime_Description',
    106                 '_Nextime_Min_Delivery_Date',
    107                 '_Nextime_Max_Delivery_Date',
    108168            );
    109169
     
    176236            '_Nextime_Shipping_Total',
    177237            '_Nextime_Calculated_Date',
    178             '_Nextime_Currency',
    179             '_Nextime_Description',
    180             '_Nextime_Min_Delivery_Date',
    181             '_Nextime_Max_Delivery_Date',
    182238        );
    183239
     
    203259
    204260    /**
    205      * The params for the tabs.
    206      *
    207      * @param array $tabs The tabs to filter.
    208      *
    209      * @return array
    210      */
    211     public function add_nextime_settings_tab( array $tabs ): array {
    212         $tabs['autoship-nextime'] = array(
    213             'label'      => __( 'Advanced Shipping', 'autoship' ),
    214             'callback'   => array( $this, 'nextime_settings_section' ),
    215             'link_class' => '',
    216         );
    217 
    218         return $tabs;
    219     }
    220 
    221     /**
    222      * Register the admin settings.
    223      *
    224      * @param array $settings The admin settings.
    225      *
    226      * @return array
    227      */
    228     public function register_nextime_admin_settings( array $settings ): array {
    229         $settings['autoship_nextime_site_id'] = 'autoship-settings-group';
    230         $settings['autoship_nextime_api_key'] = 'autoship-settings-group';
    231 
    232         return $settings;
    233     }
    234 
    235     /**
    236      * Register the admin settings field IDs.
    237      *
    238      * @param array $fields The admin settings field IDs.
    239      *
    240      * @return array
    241      */
    242     public function register_nextime_admin_settings_field_ids( array $fields ): array {
    243         return array_merge(
    244             $fields,
    245             array(
    246                 'autoship_nextime_site_id',
    247                 'autoship_nextime_api_key',
    248             )
    249         );
    250     }
    251 
    252     /**
    253      * Registers the settings section for Nextime.
    254      *
    255      * @param array $autoship_settings The autoship settings.
    256      *
    257      * @return void
    258      */
    259     public function nextime_settings_section( array $autoship_settings ): void {
    260         autoship_include_template( 'nextime/settings', array( 'autoship_settings' => $autoship_settings ) );
    261     }
    262 
    263     /**
    264261     * Enqueues the assets for the quicklaunch page.
    265262     */
     
    271268        wp_enqueue_script( 'autoship-nextime-blocks-script', $plugin_url . 'js/nextime/script.js', array( 'wp-hooks', 'wp-element', 'wp-i18n', 'wc-blocks-checkout' ), $version, true );
    272269    }
     270
     271    /**
     272     * Verify if Nextime is enabled or not.
     273     *
     274     * @return bool
     275     */
     276    public function is_nextime_enabled(): bool {
     277        try {
     278            // Check if the site is connected to QPilot.
     279            if ( ! $this->can_perform_check() ) {
     280                return false;
     281            }
     282
     283            // Check if there must be a check.
     284            if ( ! $this->must_perform_check() ) {
     285                return $this->settings->get_is_enabled();
     286            }
     287
     288            $response = $this->nextime->get_site_settings();
     289
     290            $this->settings->set_site_id( $response->get_site_id() );
     291            $this->settings->set_site_token( $response->get_site_token() );
     292            $this->settings->set_integration_id( $response->get_integration_id() );
     293            $this->settings->set_display_delivery_date( $response->should_display_delivery_date() );
     294            $this->settings->set_align_next_occurrence_date( $response->should_align_next_occurrence_date() );
     295            $this->settings->set_is_enabled( $response->is_enabled() );
     296            $this->settings->set_last_check_status( $response->is_enabled() ? 'enabled' : 'disabled' );
     297            $this->settings->set_last_check_timestamp( time() );
     298
     299            return $this->settings->get_is_enabled();
     300        } catch ( Exception $exception ) {
     301            Logger::log(
     302                'Autoship Nextime Exception',
     303                // translators: %s is the exception message.
     304                sprintf( 'An exception occurred when attempting to boot the Nextime Module. Details: %s', $exception->getMessage() )
     305            );
     306
     307            return false;
     308        }
     309    }
     310
     311    /**
     312     * Returns true if the Nextime check must be performed.
     313     *
     314     * @return bool
     315     */
     316    private function must_perform_check(): bool {
     317        $last_status = $this->settings->get_last_check_status();
     318        if ( 'unknown' === $last_status ) {
     319            return true;
     320        }
     321
     322        // Check if the last check was more than 10 minutes ago.
     323        $last_timestamp = $this->settings->get_last_check_timestamp();
     324        $delta          = apply_filters( 'autoship_nextime_check_interval', 60 );
     325        $elapsed        = time() - $last_timestamp;
     326
     327        return $elapsed > $delta;
     328    }
     329
     330    /**
     331     * Returns a value indicating whether the check can be performed.
     332     *
     333     * @return bool
     334     */
     335    private function can_perform_check(): bool {
     336        // Check if the site is connected to QPilot.
     337        return autoship_has_credentials() && autoship_has_auth_token();
     338    }
    273339}
  • autoship-cloud/trunk/autoship.php

    r3356845 r3362678  
    88 * Plugin URI: https://autoship.cloud
    99 * Description: Autoship Cloud for WooCommerce
    10  * Version: 2.10.2
     10 * Version: 2.10.3
    1111 * Author: Patterns In the Cloud LLC
    1212 * Author URI: https://qpilot.cloud
     
    1717 */
    1818
    19 define( 'Autoship_Version', '2.10.2' ); // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase
     19define( 'Autoship_Version', '2.10.3' ); // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase
    2020
    2121if ( ! defined( 'Autoship_Plugin_Dir' ) ) {
  • autoship-cloud/trunk/readme.txt

    r3356845 r3362678  
    1010WC tested up to: 10.0.4
    1111Requires PHP: 7.4
    12 Stable tag: 2.10.2
     12Stable tag: 2.10.3
    1313License: GPLv2 or later
    1414License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    291291
    292292== Changelog ==
     293
     294= 2.10.3 - 2025-09-16 =
     295
     296  - New! New integration with [Nextime.Ai](https://nextime.ai), which is a shipping and last-mile delivery solution used by Subscription Apps to increase Subscriber Value and Retention by communicating delivery dates to Subscribers and optimizing upcoming order dates, delivery methods, and shipping rates for Merchants whenever an upcoming Subscription Order is changed.
     297
     298  - New! Admins can now sync customer updates from _WP-Admin_ > _Users_ > _Edit_ directly to all existing Scheduled Orders for that customer.
     299
     300  - Improved: Performance enhancements on _My Account_ and _WP-Admin_ pages which increase loading speeds for admins and customers.
    293301
    294302= 2.10.2 - 2025-09-05 =
  • autoship-cloud/trunk/src/QPilot/Client.php

    r3355675 r3362678  
    66 * @since 1.0.0
    77 */
     8
     9use Autoship\Services\Logging\Logger;
    810
    911/**
     
    16631665     * Retrieves the Health Check status and initiates QPilot api check with new API endpoint.
    16641666     *
     1667     * @param bool $force If true, the check will be forced.
     1668     *
    16651669     * @return stdClass The Status check results object.
    16661670     * @since 1.2.29
    16671671     */
    1668     public function check_integration_status() {
    1669         return $this->get( $this->endpoint( 'integration_check' ) );
     1672    public function check_integration_status( bool $force = false ) {
     1673
     1674        $params = array();
     1675        if ( true === $force ) {
     1676            $params['force'] = 'true';
     1677
     1678            Logger::log( 'Autoship Integration Check', 'User forced integration check.' );
     1679        }
     1680
     1681        return $this->get( $this->endpoint( 'integration_check' ), $params );
    16701682    }
    16711683
  • autoship-cloud/trunk/src/admin.php

    r3352156 r3362678  
    66 * @since 1.0.0
    77 */
     8
     9use Autoship\Core\Plugin;
     10use Autoship\Services\Nextime\NextimeSettingsInterface;
    811
    912/**
     
    2225
    2326    // If there is a specific user check only fail if the current user does not have a god role and their ID doesn't match the supplied id.
    24     // Keep loose comparison for backwards compatibility.
     27    // Keep loose comparison for backwards compatibility.
    2528    if ( $user_id && ! autoship_rights_checker( $filter, $global_editor_role ) && ( get_current_user_id() != $user_id ) ) { // phpcs:ignore
    2629        return false;
     
    490493function autoship_get_subscription_status() {
    491494
     495    $ttl       = apply_filters( 'autoship_subscription_status_ttl', 15 * 60 );
     496    $cache_key = '_autoship_subscription_status';
     497    $exp_key   = '_autoship_subscription_status_expiration';
     498
     499    $now = time();
     500    $exp = (int) get_option( $exp_key, 0 );
     501    $val = get_option( $cache_key, null );
     502
     503    if ( null !== $val && $exp > $now ) {
     504        return $val;
     505    }
     506
    492507    // Site status.
    493508    $subscription_status = null;
     
    503518        }
    504519    }
     520
     521    update_option( $cache_key, $subscription_status, false );
     522    update_option( $exp_key, $now + $ttl, false );
    505523
    506524    return $subscription_status;
     
    15421560
    15431561    ?>
    1544     <iframe src="<?php echo esc_attr( autoship_get_merchants_url() ); ?>/widgets/dashboard/<?php echo $reports[ $id ]; ?>"
     1562    <iframe src="<?php echo esc_attr( autoship_get_merchants_url() ); ?>/widgets/dashboard/<?php echo $reports[ $id ]; //phpcs:ignore ?>"
    15451563            class="autoship-admin-scheduled-orders-iframe autoship-admin-dashboard-iframe" frameborder="0"></iframe>
    15461564
     
    15711589    ?>
    15721590
    1573     <iframe src="<?php echo esc_attr( autoship_get_merchants_url() ); ?>/widgets/dashboard/<?php echo $reports[ $id ]; ?>"
     1591    <iframe src="<?php echo esc_attr( autoship_get_merchants_url() ); ?>/widgets/dashboard/<?php echo $reports[ $id ]; //phpcs:ignore ?>"
    15741592            class="autoship-admin-scheduled-orders-iframe autoship-admin-dashboard-iframe" frameborder="0"></iframe>
    15751593    <?php
     
    16491667    }
    16501668
     1669    $show_nextime = false;
     1670    try {
     1671        $container        = Plugin::get_service_container();
     1672        $nextime_settings = $container->get( NextimeSettingsInterface::class );
     1673        $nextime_site_id  = $nextime_settings->get_site_id();
     1674        if ( ! empty( $nextime_site_id ) ) {
     1675            $show_nextime = true;
     1676        }
     1677    } catch ( Exception $e ) {
     1678        Logger::log( 'error', 'Error getting Nextime settings: ' . $e->getMessage() );
     1679        $show_nextime = false;
     1680    }
     1681
    16511682    ob_start();
    16521683    ?>
    16531684
     1685
     1686    <?php if ( $show_nextime ) : ?>
     1687        <div id="autoship-status-box-summary"
     1688                class="autoship-meta-boxes-summary autoship-box autoship_general_admin_notice <?php echo $nextime_settings->get_is_enabled() ? 'health-valid' : 'health-error'; ?>">
     1689            <div class="autoship-box-content">
     1690                <img src="https://nextime.ai/wp-content/uploads/2025/08/Nextime-Logo-Transparent.svg" width="150" alt="Nextime Logo" style="position:absolute; top: 20px; right: 20px;" />
     1691                <ul class="autoship-stats-list">
     1692                    <li>
     1693                        <span class="list-label title-label">
     1694                            <?php if ( $nextime_settings->get_is_enabled() ) : ?>
     1695                                <span class="autoship-status-label">
     1696                                    <?php esc_html_e( 'Autoship Advanced Shipping Features Enabled', 'autoship' ); ?>
     1697                                </span>
     1698
     1699                            <?php else : ?>
     1700                                <span class="autoship-status-label">
     1701                                    <?php esc_html_e( 'Autoship Advanced Shipping Features Disabled', 'autoship' ); ?>
     1702                                </span>
     1703                            <?php endif; ?>
     1704                        </span>
     1705                    </li>
     1706                    <li>
     1707                        <span class="list-label">
     1708                            <?php if ( $nextime_settings->get_is_enabled() ) : ?>
     1709                                <span class="autoship-status-label">
     1710                                    <p class="wp-autoship-label-message">
     1711                                        <?php esc_html_e( 'Your store has a new Shipping Method available in WooCommerce powered by Nextime. If you need assistance, contact support.' ); ?>
     1712                                    </p>
     1713                                </span>
     1714                            <?php else : ?>
     1715                                <span class="autoship-status-label">
     1716                                    <p class="wp-autoship-label-message">
     1717                                        <?php esc_html_e( 'You can enable Autoship Advanced Shipping Features directly in your QPilot Merchant Center. If you need assistance, contact support.' ); ?>
     1718                                    </p>
     1719                                </span>
     1720                            <?php endif; ?>
     1721                        </span>
     1722                    </li>
     1723                </ul>
     1724
     1725            </div>
     1726        </div>
     1727    <?php endif; ?>
     1728
    16541729    <h2><?php echo esc_html( __( 'Connection Settings', 'autoship' ) ); ?></h2>
     1730
     1731
    16551732
    16561733    <div id="autoship-status-box-summary"
     
    24442521                <p><?php echo wp_kses_post( $plugin_data['Description'] ); ?></p>
    24452522                <div class="additional-content"><?php do_action( "autoship_{$extension_name}_plugin_row_additional_content", $extension_name, $plugin_meta, $plugin_data ); ?></div>
    2446                 <div class="plugin-version-author-uri"><?php echo implode( ' | ', $plugin_meta ); ?></div>
     2523                <div class="plugin-version-author-uri"><?php echo implode( ' | ', $plugin_meta ); //phpcs:ignore ?></div>
    24472524            </div>
    24482525        </div>
  • autoship-cloud/trunk/src/api-health.php

    r3352156 r3362678  
    328328 * POST, GET, and PUT calls to WC and Autoship Endpoints.
    329329 * If successfull the corresponding status timestamps are populated.
    330  */
    331 function autoship_init_integration_test() {
     330 *
     331 * @param bool $force When set to true the integration tests are forced.
     332 */
     333function autoship_init_integration_test( bool $force = false ) {
    332334    // Clear the Status timestamps in prep for testing.
    333335    autoship_clear_integration_point_statuses();
     
    348350         * to Check if the connection is fully valid.
    349351         */
    350         $result = $client->check_integration_status();
     352        $result = $client->check_integration_status( $force );
    351353
    352354        // Run the Status checks to ensure all green lights.
     
    376378
    377379    // Run the integration test.
    378     autoship_init_integration_test();
     380    autoship_init_integration_test( true );
    379381
    380382    wp_redirect( admin_url( 'admin.php?page=autoship' ) ); // phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect
     
    555557
    556558        if ( ! FeatureManager::is_enabled( 'development_mode' ) ) {
    557             // TODO: Make this async call or move to an async service.
    558             $healthy = autoship_init_integration_test();
     559            // New: enqueue async background job instead of immediate test.
     560            autoship_queue_integration_check();
    559561        }
    560562    }
     
    628630
    629631add_action( 'qpilot_remote_request_response_errors', 'autoship_log_qpilot_client_response_errors', 10, 1 );
     632
     633
     634// ===== Background Integration Check Processor =====
     635
     636if ( ! function_exists( 'autoship_queue_integration_check' ) ) {
     637    /**
     638     * Queue a background integration check using Action Scheduler.
     639     *
     640     * @param bool $force If true, run immediately by enqueueing an async action even if another is pending.
     641     * @return void
     642     */
     643    function autoship_queue_integration_check( $force = false ) {
     644
     645        if ( ! function_exists( 'as_enqueue_async_action' ) ) {
     646            // Action Scheduler missing; fallback to immediate run to preserve behavior.
     647            autoship_init_integration_test();
     648            return;
     649        }
     650
     651        $hook = 'autoship_run_integration_check';
     652
     653        // Avoid duplicates unless forced.
     654        $pending = as_next_scheduled_action( $hook );
     655        if ( $pending && ! $force ) {
     656            return;
     657        }
     658
     659        // Enqueue async job (runs as soon as possible).
     660        as_enqueue_async_action( $hook, array( 'forced' => (bool) $force ), 'autoship' );
     661    }
     662}
     663
     664add_action(
     665    'autoship_run_integration_check',
     666    function ( $args ) { // phpcs:ignore
     667        // Skip on new installations.
     668        if ( function_exists( 'autoship_is_new' ) && autoship_is_new() ) {
     669            return;
     670        }
     671
     672        // Executes the same logic as before (fires hooks & updates timestamps and health status).
     673        autoship_init_integration_test();
     674
     675        // Track last run (optional for UI).
     676        update_option( '_autoship_last_integration_check_utc', time(), false );
     677    },
     678    10,
     679    1
     680);
     681
     682// Admin AJAX to force a background integration check.
     683add_action(
     684    'wp_ajax_autoship_force_integration_check',
     685    function () { // phpcs:ignore
     686        if ( ! current_user_can( 'manage_woocommerce' ) ) { // phpcs:ignore
     687            wp_send_json_error( array( 'message' => 'Forbidden' ), 403 );
     688        }
     689
     690        check_ajax_referer( 'autoship_force_integration_check', 'nonce' );
     691
     692        autoship_queue_integration_check( true );
     693
     694        wp_send_json_success( array( 'queued' => true ) );
     695    }
     696);
  • autoship-cloud/trunk/src/cart.php

    r3352156 r3362678  
    102102        if ( isset( $rfreq_type ) && ! empty( $rfreq_type ) ) {
    103103            // Keep loose comparison for backwards compatibility.
    104             $valid = $schedule_values['autoship_frequency_type'] == $rfreq_type;
     104            $valid = $schedule_values['autoship_frequency_type'] == $rfreq_type; //phpcs:ignore
    105105        }
    106106    }
     
    442442    // Pull any schedule values out of the session cart item ( or init any new ones ).
    443443    $schedule_data = autoship_get_item_data_schedule_values( $session_data );
    444    
     444
    445445    // Now re-process the cart item as if it was just added so that the price, next occurrence, etc
    446446    // is refreshed and values validated.
  • autoship-cloud/trunk/src/customers.php

    r3356845 r3362678  
    103103    $customer_data = autoship_generate_customer_shipping_data( $wc_customer, $customer_data );
    104104
     105    $customer_data['applyToScheduledOrders'] = autoship_get_apply_to_scheduled_orders_setting();
     106
    105107    // Get the Customer Data.
    106108    return apply_filters(
     
    108110        array_merge(
    109111            array(
    110                 'applyToScheduledOrders' => false,
    111                 'id'                     => strval( $wc_customer->get_id() ),
    112                 'email'                  => $wc_customer->get_email(),
    113                 'firstName'              => $wc_customer->get_first_name(),
    114                 'lastName'               => $wc_customer->get_last_name(),
     112                'id'        => strval( $wc_customer->get_id() ),
     113                'email'     => $wc_customer->get_email(),
     114                'firstName' => $wc_customer->get_first_name(),
     115                'lastName'  => $wc_customer->get_last_name(),
    115116            ),
    116117            $customer_data
     
    10551056
    10561057/**
     1058 * Retrieves the Apply to Scheduled Orders setting for a customer.
     1059 *
     1060 * @return bool True if enabled else false.
     1061 */
     1062function autoship_get_apply_to_scheduled_orders_setting() {
     1063    $value = isset( $_POST['autoship_apply_to_scheduled_orders_by_default'] ) ? (bool) $_POST['autoship_apply_to_scheduled_orders_by_default'] : false; // phpcs:ignore WordPress.Security.NonceVerification.Missing
     1064
     1065    return empty( $value ) ? false : (bool) $value;
     1066}
     1067
     1068/**
     1069 * Includes the Sync Autoship Orders on the User Profile.
     1070 */
     1071function autoship_include_sync_autoship_orders_on_profile() {
     1072    ?>
     1073
     1074    <table class="form-table">
     1075        <tr>
     1076            <td>
     1077                <div id="autoship_apply_to_scheduled_orders_field">
     1078                    <?php
     1079                    woocommerce_form_field(
     1080                        'autoship_apply_to_scheduled_orders_by_default',
     1081                        array(
     1082                            'type'     => 'checkbox',
     1083                            'required' => false,
     1084                            'class'    => array( 'autoship-option' ),
     1085                            'label'    => __( 'When enabled, any changes made to this customer’s account will also update their Autoship Scheduled Orders. Changes to the customer profile are always synced, even if this setting is disabled', 'autoship' ),
     1086                        )
     1087                    );
     1088                    ?>
     1089                </div>
     1090            </td>
     1091        </tr>
     1092    </table>
     1093    <?php
     1094}
     1095
     1096/**
    10571097 * Processes the Option to refresh the customer metrics from the User Profile.
    10581098 *
     
    10781118add_action( 'edit_user_profile', 'autoship_include_customer_metrics_on_profile' );
    10791119add_action( 'show_user_profile', 'autoship_include_customer_metrics_on_profile' );
     1120add_action( 'edit_user_profile', 'autoship_include_sync_autoship_orders_on_profile' );
     1121add_action( 'show_user_profile', 'autoship_include_sync_autoship_orders_on_profile' );
     1122
     1123/**
     1124 * Get total customers (cached to reduce API calls on admin render).
     1125 */
     1126function autoship_get_total_customers_cached() {
     1127    $ttl       = apply_filters( 'autoship_total_customers_ttl', 15 * 60 );
     1128    $cache_key = '_autoship_total_customers';
     1129    $exp_key   = '_autoship_total_customers_expiration';
     1130
     1131    $now = time();
     1132    $exp = (int) get_option( $exp_key, 0 );
     1133    $val = get_option( $cache_key, null );
     1134
     1135    if ( is_numeric( $val ) && $exp > $now ) {
     1136        return (int) $val;
     1137    }
     1138
     1139    $client = autoship_get_default_client();
     1140    try {
     1141        $customers = $client->get_customers(
     1142            array(
     1143                'pageSize' => 1,
     1144                'page'     => 1,
     1145            )
     1146        );
     1147
     1148        $total     = isset( $customers->totalCount ) ? (int) $customers->totalCount : 0; // phpcs:ignore
     1149    } catch ( Exception $e ) {
     1150        $total = 0;
     1151    }
     1152
     1153    update_option( $cache_key, $total, false );
     1154    update_option( $exp_key, $now + $ttl, false );
     1155
     1156    return $total;
     1157}
  • autoship-cloud/trunk/src/payments.php

    r3352156 r3362678  
    562562function autoship_get_ppcp_order_payment_data( $order_id, $order ) {
    563563
    564     if ( $order->get_payment_method() != 'ppcp-gateway' ) {
     564    if ( $order->get_payment_method() != 'ppcp-gateway' ) { //phpcs:ignore
    565565        return null;
    566566    }
     
    653653    $user_id               = $wc_order->get_user_id();
    654654    $wc_tokens             = WC_Payment_Tokens::get_customer_tokens( $user_id, 'ppcp-credit-card-gateway' );
    655     if ( ( $card_payment_token_id && 'new' != $card_payment_token_id ) && $wc_tokens ) {
     655    if ( ( $card_payment_token_id && 'new' != $card_payment_token_id ) && $wc_tokens ) { //phpcs:ignore
    656656
    657657        $gateway_customer_id = get_user_meta( $user_id, '_ppcp_target_customer_id', true );
     
    17151715
    17161716    $type     = $token->get_card_type();
    1717     $ext_type = 'Paypal' == $type ? 'braintree_paypal' : 'braintree_credit_card';
     1717    $ext_type = 'Paypal' == $type ? 'braintree_paypal' : 'braintree_credit_card'; //phpcs:ignore
    17181718
    17191719    // Get the types to see if this is legacy or new Braintree Paypal.
     
    17291729
    17301730    // Only use legacy methods & filters if this is a pre-token version.
    1731     if ( ! isset( $types[ $ext_type ] ) && 'Paypal' == $type ) {
     1731    if ( ! isset( $types[ $ext_type ] ) && 'Paypal' == $type ) { //phpcs:ignore
    17321732        // Update the Description for paypal.
    17331733        $payment_tokens                     = get_user_meta( $user_id, '_wc_braintree_paypal_payment_tokens' . $meta_ext, true );
    17341734        $email                              = $payment_tokens[ $token->get_token() ]['payer_email'];
    17351735        $payment_method_data['description'] = apply_filters( 'autoship_braintree_paypal_payment_method_description', sprintf( 'Paypal for %s', $email ) );
    1736     } elseif ( 'Paypal' == $type ) {
     1736    } elseif ( 'Paypal' == $type ) { //phpcs:ignore
    17371737        $email                              = $token->get_meta( 'payer_email' );
    17381738        $payment_method_data['description'] = apply_filters( 'autoship_braintree_paypal_payment_method_description', sprintf( 'Paypal for %s', $email ) );
     
    24722472 */
    24732473function autoship_delete_paypal_v3_payment_method( $valid, $type, $token, $method ) {
    2474     if ( 'PayPalV3' == $type ) {
     2474    if ( 'PayPalV3' == $type ) { //phpcs:ignore
    24752475
    24762476        $gateway_customer_id = get_user_meta( $token->get_user_id(), '_ppcp_target_customer_id', true );
     
    24792479        }
    24802480
    2481         return ( $method->gatewayCustomerId == $gateway_customer_id && $method->gatewayPaymentId == $token->get_token() ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
     2481        return ( $method->gatewayCustomerId == $gateway_customer_id && $method->gatewayPaymentId == $token->get_token() ); // phpcs:ignore
    24822482    }
    24832483
     
    27482748
    27492749    // PayPal Payments adjustments.
    2750     if ( 'PayPalV3' == $type ) {
    2751         if ( 'ppcp-credit-card-gateway' == $gateway ) {
     2750    if ( 'PayPalV3' == $type ) { //phpcs:ignore
     2751        if ( 'ppcp-credit-card-gateway' == $gateway ) { //phpcs:ignore
    27522752            $data['gatewayPaymentType'] = 26;
    27532753        }
    27542754
    2755         if ( 'ppcp-gateway' == $gateway ) {
     2755        if ( 'ppcp-gateway' == $gateway ) { //phpcs:ignore
    27562756            $data['gatewayPaymentType'] = 25;
    27572757            $data['description']        = 'PayPal Payments';
     
    27692769
    27702770    // Stripe Link Adjustments.
    2771     if ( is_a( $token, 'WC_Payment_Token_Link' ) && 'Stripe' == $type && 'stripe' == $gateway ) {
     2771    if ( is_a( $token, 'WC_Payment_Token_Link' ) && 'Stripe' == $type && 'stripe' == $gateway ) { //phpcs:ignore
    27722772        $data['gatewayPaymentType'] = 32;
    27732773    }
     
    28932893    }
    28942894
    2895     if ( 'braintree_paypal' != $autoship_method_type ) {
     2895    if ( 'braintree_paypal' != $autoship_method_type ) { //phpcs:ignore
    28962896        $token->set_last4( $user_tokens[ $autoship_method_id ]['last_four'] );
    28972897        // HACK: Most of these tokens are not giving four digit expiration years and
     
    29212921function autoship_tokenize_non_fully_implemented_token_classes( $token ) {
    29222922
    2923     if ( empty( $token ) || 'braintree_paypal' != $token->get_gateway_id() ) {
     2923    if ( empty( $token ) || 'braintree_paypal' != $token->get_gateway_id() ) { //phpcs:ignore
    29242924        return $token;
    29252925    }
     
    33933393
    33943394    // Set the status for the transaction.
    3395     $status = 'Completed' == $payment_meta['PAYMENTSTATUS'] ? $payment_meta['PAYMENTSTATUS'] : $payment_meta['PAYMENTSTATUS'] . '_' . $payment_meta['PENDINGREASON'];
     3395    $status = 'Completed' == $payment_meta['PAYMENTSTATUS'] ? $payment_meta['PAYMENTSTATUS'] : $payment_meta['PAYMENTSTATUS'] . '_' . $payment_meta['PENDINGREASON']; //phpcs:ignore
    33963396
    33973397    $refund_data = array(
     
    34303430     * @HACK Need better way to test if this is a live or test payment process.
    34313431     */
    3432     if ( isset( $payment_meta['links'] ) && ! empty( $payment_meta['links'] ) && ( strpos( $payment_meta['links'][0]['href'], 'https://api.sandbox.paypal.com' ) != false ) ) {
     3432    if ( isset( $payment_meta['links'] ) && ! empty( $payment_meta['links'] ) && ( strpos( $payment_meta['links'][0]['href'], 'https://api.sandbox.paypal.com' ) != false ) ) { //phpcs:ignore
    34333433        $order->update_meta_data( '_ppcp_paypal_payment_mode', 'sandbox' );
    34343434        $order->save();
     
    37403740
    37413741    // Uses the flag to check if the payment method is a Braintree or not.
    3742     $is_paypal = apply_filters( 'autoship_is_paypal_payment_method_scheduled_order', false != strpos( $payment_method['description'], $paypal_flag ), $payment_meta, $order, $payment_method );
     3742    $is_paypal = apply_filters( 'autoship_is_paypal_payment_method_scheduled_order', false != strpos( $payment_method['description'], $paypal_flag ), $payment_meta, $order, $payment_method ); //phpcs:ignore
    37433743
    37443744    if ( $is_paypal ) {
  • autoship-cloud/trunk/src/product-page.php

    r3352156 r3362678  
    537537                </div><!-- Enable AUtoship Frequency Overrides -->
    538538
    539                 <div class="product_data_options show_hide_product_data_group_simple" <?php echo $show_prod_overrides; ?>>
     539                <div class="product_data_options show_hide_product_data_group_simple" <?php echo $show_prod_overrides; //phpcs:ignore ?>>
    540540                   
    541541                    <?php
     
    628628            </div><!-- Enable AUtoship Frequency Overrides -->
    629629
    630             <div class="frequency_options show_hide_frequency_options_group_simple" <?php echo $show_freq_overrides; ?>>
     630            <div class="frequency_options show_hide_frequency_options_group_simple" <?php echo $show_freq_overrides; //phpcs:ignore ?>>
    631631               
    632632                <?php
     
    725725            </div><!-- Enable Autoship Relative Next Occurrence -->
    726726
    727             <div class="options_group options-form-group autoship-next-occurrence show_hide_autoship_next_occurrence_options" <?php echo $show_relative; ?>>
     727            <div class="options_group options-form-group autoship-next-occurrence show_hide_autoship_next_occurrence_options" <?php echo $show_relative; //phpcs:ignore ?>>
    728728
    729729                <h4><?php echo esc_html( __( 'Set Next Occurrence Date Relative to Checkout', 'autoship' ) ); ?></h4>
     
    937937                </p>
    938938
    939                 <div class="product_data_options show_hide_product_data_group_variable_<?php echo esc_attr( $loop ); ?>" <?php echo $show_prod_overrides; ?>>
     939                <div class="product_data_options show_hide_product_data_group_variable_<?php echo esc_attr( $loop ); ?>" <?php echo $show_prod_overrides; //phpcs:ignore ?>>
    940940                   
    941941                    <?php
     
    10591059
    10601060            <!-- Autoship Custom frequency options Group -->
    1061             <div class="frequency_options show_hide_frequency_options_group_<?php echo esc_attr( $loop ); ?>" <?php echo $show_freq_overrides; ?>>
     1061            <div class="frequency_options show_hide_frequency_options_group_<?php echo esc_attr( $loop ); ?>" <?php echo $show_freq_overrides; //phpcs:ignore ?>>
    10621062
    10631063                <?php
  • autoship-cloud/trunk/src/products.php

    r3352156 r3362678  
    495495        foreach ( $options as $key => $values ) {
    496496
    497             // Keep loose comparison for backwards compatibility.
    498             if ( $frequency_type == $values['frequency_type'] && $frequency == $values['frequency'] ) {
     497            // Keep loose comparison for backwards compatibility.
     498            if ( $frequency_type == $values['frequency_type'] && $frequency == $values['frequency'] ) { //phpcs:ignore
    499499                return true;
    500500            }
  • autoship-cloud/trunk/src/scheduled-orders.php

    r3355675 r3362678  
    211211
    212212    // Create a cache key specific to this function and customer.
    213     $cache_key   = 'autoship_has_scheduled_orders_' . $customer_id;
    214     $cache_group = 'autoship_customer_data';
     213    $cache_key = "autoship_customers_data:{$customer_id}:has_scheduled_orders";
    215214
    216215    // Check if we already have a cached result for this customer.
    217     $cached_result = wp_cache_get( $cache_key, $cache_group );
     216    $cached_result = wp_cache_get( $cache_key, 'autoship' );
    218217
    219218    // If we have a cached result, return it.
    220219    if ( false !== $cached_result ) {
    221         return $cached_result;
     220
     221        return 'yes' == $cached_result; // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual
    222222    }
    223223
    224224    $params['page']        = 1;
    225     $params['pageSize']    = 1;
    226     $params['orderBy']     = 'Id';
     225    $params['pageSize']    = 25;
     226    $params['orderBy']     = 'Id';
    227227    $params['statusNames'] = array( 'Active', 'Processing', 'Pending', 'Paused', 'Failed' );
    228228
     
    235235
    236236        // Cache the negative result to avoid repeated API calls.
    237         wp_cache_set( $cache_key, false, $cache_group );
     237        wp_cache_set( $cache_key, 'no', 'autoship', 60 );
    238238
    239239        return false;
     
    244244
    245245        // Cache the negative result to avoid repeated API calls.
    246         wp_cache_set( $cache_key, false, $cache_group );
     246        wp_cache_set( $cache_key, 'no', 'autoship', 60 );
    247247
    248248        return false;
     
    252252
    253253    // Cache the result for future calls in this request.
    254     wp_cache_set( $cache_key, $result, $cache_group, 60 );
     254    wp_cache_set( $cache_key, $result ? 'yes' : 'no', 'autoship', 60 );
    255255
    256256    return $result;
     
    50445044function autoship_search_all_scheduled_orders( $customer_id = null, $index = 1, $params = array(), $recursive = true ) {
    50455045
    5046     $params         = wp_parse_args( $params, array( 'pageSize' => 25 ) );
    5047     $params['page'] = $index;
     5046    $params                = wp_parse_args( $params, array( 'pageSize' => 100 ) );
     5047    $params['page']        = $index;
     5048    $params['statusNames'] = array( 'Active', 'Processing', 'Pending', 'Paused', 'Failed' );
    50485049
    50495050    $client = autoship_get_default_client();
  • autoship-cloud/trunk/templates/admin/reports.php

    r3352156 r3362678  
    1010
    1111$tabs       = autoship_reports_tabs(); //phpcs:ignore
    12 $active_tab = isset( $_GET['tab'] ) && isset( $tabs[ $_GET['tab'] ] ) ? $_GET['tab'] : apply_filters( 'autoship_admin_reports_default_tab', key( $tabs ) );
     12$active_tab = isset( $_GET['tab'] ) && isset( $tabs[ $_GET['tab'] ] ) ? $_GET['tab'] : apply_filters( 'autoship_admin_reports_default_tab', key( $tabs ) ); //phpcs:ignore
    1313
    1414?>
     
    1717    <?php do_action( 'autoship_after_admin_reports_header', $active_tab, $tabs ); ?>
    1818    <h2 class="nav-tab-wrapper">
    19         <?php foreach ( $tabs as $tab => $values ) { ?>
    20             <a href="<?php echo admin_url( 'admin.php?page=reports&tab='. $tab ); ?>" class="nav-tab <?php echo $values['link_class']; ?> <?php echo $active_tab == $tab ? 'nav-tab-active' : ''; ?>"><?php echo $values['label']; ?></a>
     19        <?php foreach ( $tabs as $tab => $values ) { //phpcs:ignore ?>
     20            <a href="<?php echo admin_url( 'admin.php?page=reports&tab='. $tab ); ?>" class="nav-tab <?php echo $values['link_class']; ?> <?php echo $active_tab == $tab ? 'nav-tab-active' : ''; ?>"><?php echo $values['label']; // phpcs:ignore ?></a>
    2121        <?php } ?>
    2222    </h2>
    23     <?php foreach ( $tabs as $tab => $values ) { ?>
    24         <div id="<?php echo $tab; ?>" class="wrap" style="display:<?php echo $active_tab == $tab ? 'block' : 'none'; ?>;">
     23    <?php foreach ( $tabs as $tab => $values ) { //phpcs:ignore ?>
     24        <div id="<?php echo $tab; ?>" class="wrap" style="display:<?php echo $active_tab == $tab ? 'block' : 'none'; //phpcs:ignore ?>;">
    2525
    2626            <?php
    2727            $function = $values['callback'];
    28             if ( function_exists( $function ) && $active_tab == $tab ) {
     28            if ( function_exists( $function ) && $active_tab == $tab ) { //phpcs:ignore
    2929                $function( $active_tab );
    3030            }
  • autoship-cloud/trunk/templates/admin/utilities.php

    r3352156 r3362678  
    520520    <?php
    521521    // Retrieve the total customer in API count.
    522     $total_customers = autoship_search_available_customers( array( 'pageSize' => 1 ), 1, false );
    523     $total           = ! is_wp_error( $total_customers ) ? $total_customers->totalCount : 0; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
     522    $total = autoship_get_total_customers_cached();
    524523
    525524    // translators: %d is the number of customers.
  • autoship-cloud/trunk/templates/cart/schedule-options.php

    r3352156 r3362678  
    6666    <?php do_action( 'autoship_after_cart_schedule_radio_options', $product, $frequency_type, $frequency, $next_occurrence, $cart_item, $autoship_selected ); ?>
    6767
    68     <div class="autoship-frequency <?php echo esc_attr( $skin['frequency'] ); ?>" <?php echo $autoship_active; ?>>
     68    <div class="autoship-frequency <?php echo esc_attr( $skin['frequency'] ); ?>" <?php echo $autoship_active; //phpcs:ignore ?>>
    6969
    7070        <label class="<?php echo esc_attr( $skin['label'] ); ?>"><?php echo wp_kses_post( apply_filters( 'autoship_frequency_label', __( 'Schedule', 'autoship' ), $product ) ); ?></label>
     
    7575                <?php
    7676                // Check if this option is currently assigned.
    77                 $selected = $autoship_selected && ( $cart_item['autoship_frequency_type'] == $option['frequency_type'] && $cart_item['autoship_frequency'] == $option['frequency'] ) ? 'selected="selected" class="current-frequency"' : '';
     77                $selected = $autoship_selected && ( $cart_item['autoship_frequency_type'] == $option['frequency_type'] && $cart_item['autoship_frequency'] == $option['frequency'] ) ? 'selected="selected" class="current-frequency"' : ''; //phpcs:ignore
    7878                ?>
    7979
    80                 <option value="<?php echo esc_attr( wp_json_encode( $option ) ); ?>" <?php echo $selected; ?> >
     80                <option value="<?php echo esc_attr( wp_json_encode( $option ) ); ?>" <?php echo $selected; //phpcs:ignore ?> >
    8181                    <?php echo esc_html( $option['display_name'] ); ?>
    8282                </option>
  • autoship-cloud/trunk/vendor/autoload.php

    r3352156 r3362678  
    1515        }
    1616    }
    17     trigger_error(
    18         $err,
    19         E_USER_ERROR
    20     );
     17    throw new RuntimeException($err);
    2118}
    2219
  • autoship-cloud/trunk/vendor/composer/InstalledVersions.php

    r3299545 r3362678  
    2727class InstalledVersions
    2828{
     29    /**
     30     * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
     31     * @internal
     32     */
     33    private static $selfDir = null;
     34
    2935    /**
    3036     * @var mixed[]|null
     
    324330
    325331    /**
     332     * @return string
     333     */
     334    private static function getSelfDir()
     335    {
     336        if (self::$selfDir === null) {
     337            self::$selfDir = strtr(__DIR__, '\\', '/');
     338        }
     339
     340        return self::$selfDir;
     341    }
     342
     343    /**
    326344     * @return array[]
    327345     * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
     
    337355
    338356        if (self::$canGetVendors) {
    339             $selfDir = strtr(__DIR__, '\\', '/');
     357            $selfDir = self::getSelfDir();
    340358            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
    341359                $vendorDir = strtr($vendorDir, '\\', '/');
  • autoship-cloud/trunk/vendor/composer/autoload_classmap.php

    r3352156 r3362678  
    1717    'Autoship\\Core\\SitesManager' => $baseDir . '/app/Core/SitesManager.php',
    1818    'Autoship\\Core\\TemplateLoader' => $baseDir . '/app/Core/TemplateLoader.php',
     19    'Autoship\\Domain\\Nextime\\DeliveryDate' => $baseDir . '/app/Domain/Nextime/DeliveryDate.php',
    1920    'Autoship\\Domain\\Nextime\\NextimeShippingCalculator' => $baseDir . '/app/Domain/Nextime/NextimeShippingCalculator.php',
     21    'Autoship\\Domain\\Nextime\\ShippingLine' => $baseDir . '/app/Domain/Nextime/ShippingLine.php',
     22    'Autoship\\Domain\\Nextime\\ShippingOptions' => $baseDir . '/app/Domain/Nextime/ShippingOptions.php',
     23    'Autoship\\Domain\\Nextime\\ShippingRate' => $baseDir . '/app/Domain/Nextime/ShippingRate.php',
     24    'Autoship\\Domain\\Nextime\\ShippingRateServiceCode' => $baseDir . '/app/Domain/Nextime/ShippingRateServiceCode.php',
    2025    'Autoship\\Domain\\PaymentIntegration' => $baseDir . '/app/Domain/PaymentIntegration.php',
    2126    'Autoship\\Domain\\PaymentIntegrationFactory' => $baseDir . '/app/Domain/PaymentIntegrationFactory.php',
     
    5762    'Autoship\\Services\\Logging\\SinkFactory' => $baseDir . '/app/Services/Logging/SinkFactory.php',
    5863    'Autoship\\Services\\Logging\\SinkInterface' => $baseDir . '/app/Services/Logging/SinkInterface.php',
     64    'Autoship\\Services\\Nextime\\Access\\SiteSettingsResponse' => $baseDir . '/app/Services/Nextime/Access/SiteSettingsResponse.php',
     65    'Autoship\\Services\\Nextime\\Carriers\\ShippingOptionsRequest' => $baseDir . '/app/Services/Nextime/Carriers/ShippingOptionsRequest.php',
     66    'Autoship\\Services\\Nextime\\Carriers\\ShippingOptionsRequestItem' => $baseDir . '/app/Services/Nextime/Carriers/ShippingOptionsRequestItem.php',
     67    'Autoship\\Services\\Nextime\\Carriers\\ShippingOptionsResponse' => $baseDir . '/app/Services/Nextime/Carriers/ShippingOptionsResponse.php',
     68    'Autoship\\Services\\Nextime\\Implementations\\NextimeCarriersManagement' => $baseDir . '/app/Services/Nextime/Implementations/NextimeCarriersManagement.php',
     69    'Autoship\\Services\\Nextime\\Implementations\\NextimeSitesManagement' => $baseDir . '/app/Services/Nextime/Implementations/NextimeSitesManagement.php',
     70    'Autoship\\Services\\Nextime\\Implementations\\WordPressNextimeHttpClient' => $baseDir . '/app/Services/Nextime/Implementations/WordPressNextimeHttpClient.php',
     71    'Autoship\\Services\\Nextime\\Implementations\\WordPressNextimeSettings' => $baseDir . '/app/Services/Nextime/Implementations/WordPressNextimeSettings.php',
     72    'Autoship\\Services\\Nextime\\Interfaces\\CarriersManagementInterface' => $baseDir . '/app/Services/Nextime/Interfaces/CarriersManagementInterface.php',
     73    'Autoship\\Services\\Nextime\\Interfaces\\SitesManagementInterface' => $baseDir . '/app/Services/Nextime/Interfaces/SitesManagementInterface.php',
     74    'Autoship\\Services\\Nextime\\NextimeHttpClientInterface' => $baseDir . '/app/Services/Nextime/NextimeHttpClientInterface.php',
     75    'Autoship\\Services\\Nextime\\NextimeHttpException' => $baseDir . '/app/Services/Nextime/NextimeHttpException.php',
     76    'Autoship\\Services\\Nextime\\NextimeServiceClient' => $baseDir . '/app/Services/Nextime/NextimeServiceClient.php',
     77    'Autoship\\Services\\Nextime\\NextimeServiceInterface' => $baseDir . '/app/Services/Nextime/NextimeServiceInterface.php',
     78    'Autoship\\Services\\Nextime\\NextimeSettingsInterface' => $baseDir . '/app/Services/Nextime/NextimeSettingsInterface.php',
    5979    'Autoship\\Services\\QPilot\\Access\\AccessTokenResponse' => $baseDir . '/app/Services/QPilot/Access/AccessTokenResponse.php',
    6080    'Autoship\\Services\\QPilot\\Access\\OAuth2Request' => $baseDir . '/app/Services/QPilot/Access/OAuth2Request.php',
  • autoship-cloud/trunk/vendor/composer/autoload_static.php

    r3352156 r3362678  
    3232        'Autoship\\Core\\SitesManager' => __DIR__ . '/../..' . '/app/Core/SitesManager.php',
    3333        'Autoship\\Core\\TemplateLoader' => __DIR__ . '/../..' . '/app/Core/TemplateLoader.php',
     34        'Autoship\\Domain\\Nextime\\DeliveryDate' => __DIR__ . '/../..' . '/app/Domain/Nextime/DeliveryDate.php',
    3435        'Autoship\\Domain\\Nextime\\NextimeShippingCalculator' => __DIR__ . '/../..' . '/app/Domain/Nextime/NextimeShippingCalculator.php',
     36        'Autoship\\Domain\\Nextime\\ShippingLine' => __DIR__ . '/../..' . '/app/Domain/Nextime/ShippingLine.php',
     37        'Autoship\\Domain\\Nextime\\ShippingOptions' => __DIR__ . '/../..' . '/app/Domain/Nextime/ShippingOptions.php',
     38        'Autoship\\Domain\\Nextime\\ShippingRate' => __DIR__ . '/../..' . '/app/Domain/Nextime/ShippingRate.php',
     39        'Autoship\\Domain\\Nextime\\ShippingRateServiceCode' => __DIR__ . '/../..' . '/app/Domain/Nextime/ShippingRateServiceCode.php',
    3540        'Autoship\\Domain\\PaymentIntegration' => __DIR__ . '/../..' . '/app/Domain/PaymentIntegration.php',
    3641        'Autoship\\Domain\\PaymentIntegrationFactory' => __DIR__ . '/../..' . '/app/Domain/PaymentIntegrationFactory.php',
     
    7277        'Autoship\\Services\\Logging\\SinkFactory' => __DIR__ . '/../..' . '/app/Services/Logging/SinkFactory.php',
    7378        'Autoship\\Services\\Logging\\SinkInterface' => __DIR__ . '/../..' . '/app/Services/Logging/SinkInterface.php',
     79        'Autoship\\Services\\Nextime\\Access\\SiteSettingsResponse' => __DIR__ . '/../..' . '/app/Services/Nextime/Access/SiteSettingsResponse.php',
     80        'Autoship\\Services\\Nextime\\Carriers\\ShippingOptionsRequest' => __DIR__ . '/../..' . '/app/Services/Nextime/Carriers/ShippingOptionsRequest.php',
     81        'Autoship\\Services\\Nextime\\Carriers\\ShippingOptionsRequestItem' => __DIR__ . '/../..' . '/app/Services/Nextime/Carriers/ShippingOptionsRequestItem.php',
     82        'Autoship\\Services\\Nextime\\Carriers\\ShippingOptionsResponse' => __DIR__ . '/../..' . '/app/Services/Nextime/Carriers/ShippingOptionsResponse.php',
     83        'Autoship\\Services\\Nextime\\Implementations\\NextimeCarriersManagement' => __DIR__ . '/../..' . '/app/Services/Nextime/Implementations/NextimeCarriersManagement.php',
     84        'Autoship\\Services\\Nextime\\Implementations\\NextimeSitesManagement' => __DIR__ . '/../..' . '/app/Services/Nextime/Implementations/NextimeSitesManagement.php',
     85        'Autoship\\Services\\Nextime\\Implementations\\WordPressNextimeHttpClient' => __DIR__ . '/../..' . '/app/Services/Nextime/Implementations/WordPressNextimeHttpClient.php',
     86        'Autoship\\Services\\Nextime\\Implementations\\WordPressNextimeSettings' => __DIR__ . '/../..' . '/app/Services/Nextime/Implementations/WordPressNextimeSettings.php',
     87        'Autoship\\Services\\Nextime\\Interfaces\\CarriersManagementInterface' => __DIR__ . '/../..' . '/app/Services/Nextime/Interfaces/CarriersManagementInterface.php',
     88        'Autoship\\Services\\Nextime\\Interfaces\\SitesManagementInterface' => __DIR__ . '/../..' . '/app/Services/Nextime/Interfaces/SitesManagementInterface.php',
     89        'Autoship\\Services\\Nextime\\NextimeHttpClientInterface' => __DIR__ . '/../..' . '/app/Services/Nextime/NextimeHttpClientInterface.php',
     90        'Autoship\\Services\\Nextime\\NextimeHttpException' => __DIR__ . '/../..' . '/app/Services/Nextime/NextimeHttpException.php',
     91        'Autoship\\Services\\Nextime\\NextimeServiceClient' => __DIR__ . '/../..' . '/app/Services/Nextime/NextimeServiceClient.php',
     92        'Autoship\\Services\\Nextime\\NextimeServiceInterface' => __DIR__ . '/../..' . '/app/Services/Nextime/NextimeServiceInterface.php',
     93        'Autoship\\Services\\Nextime\\NextimeSettingsInterface' => __DIR__ . '/../..' . '/app/Services/Nextime/NextimeSettingsInterface.php',
    7494        'Autoship\\Services\\QPilot\\Access\\AccessTokenResponse' => __DIR__ . '/../..' . '/app/Services/QPilot/Access/AccessTokenResponse.php',
    7595        'Autoship\\Services\\QPilot\\Access\\OAuth2Request' => __DIR__ . '/../..' . '/app/Services/QPilot/Access/OAuth2Request.php',
Note: See TracChangeset for help on using the changeset viewer.