AlkantarClanX12

Your IP : 216.73.217.24


Current Path : /www/capitalgmcbuickregina_830/public/wp-content/plugins/leadbox/cli/
Upload File :
Current File : /www/capitalgmcbuickregina_830/public/wp-content/plugins/leadbox/cli/lead-intake-target-command.php

<?php if (!defined('ABSPATH')) exit;

/**
 * LBT-1468 — WP-CLI command to read/set the lead-intake routing target.
 *
 *     wp leadbox lead-intake-target get
 *     wp leadbox lead-intake-target set <legacy|leadbox_os|both>
 *
 * Registered in Leadbox.php under `if (defined('WP_CLI') && WP_CLI)`.
 */
final class LB_CLI_Lead_Intake_Target_Command
{
  /**
   * Shows the effective lead-intake target, the stored option, and whether the
   * LEADBOX_LEAD_INTAKE_TARGET constant is overriding it.
   *
   * ## EXAMPLES
   *
   *     wp leadbox lead-intake-target get
   *
   * @when after_wp_load
   */
  public function get($args, $assoc_args)
  {
    $settings = get_option('leadbox-settings');
    $stored = (is_array($settings) && isset($settings['lead_intake_target']) && $settings['lead_intake_target'] !== '')
      ? $settings['lead_intake_target']
      : '(unset — defaults to legacy)';

    $effective = LB_API_Settings::getInstance()->getLeadIntakeTarget();

    WP_CLI::log('Effective target : ' . $effective);
    WP_CLI::log('Stored option    : ' . $stored);

    if (defined('LEADBOX_LEAD_INTAKE_TARGET')) {
      WP_CLI::log('Constant override: LEADBOX_LEAD_INTAKE_TARGET = ' . strtolower((string) LEADBOX_LEAD_INTAKE_TARGET));
      WP_CLI::warning('The constant overrides the stored option; the effective target is driven by wp-config.php.');
    } else {
      WP_CLI::log('Constant override: (not defined)');
    }
  }

  /**
   * Sets the stored lead-intake target option.
   *
   * ## OPTIONS
   *
   * <target>
   * : Where Ninja Forms leads are routed.
   * ---
   * options:
   *   - legacy
   *   - leadbox_os
   *   - both
   * ---
   *
   * ## EXAMPLES
   *
   *     # Enter dual-write mode for parity monitoring
   *     wp leadbox lead-intake-target set both
   *
   *     # Cut fully over to Leadbox Platform
   *     wp leadbox lead-intake-target set leadbox_os
   *
   * @when after_wp_load
   */
  public function set($args, $assoc_args)
  {
    $target = isset($args[0]) ? strtolower(trim($args[0])) : '';
    $valid  = LB_API_Settings::LEAD_INTAKE_TARGETS;

    if (!in_array($target, $valid, true)) {
      WP_CLI::error(sprintf(
        "Invalid target '%s'. Valid values: %s.",
        $target,
        implode(', ', $valid)
      ));
    }

    $settings = get_option('leadbox-settings');
    if (!is_array($settings)) {
      $settings = array();
    }
    $settings['lead_intake_target'] = $target;
    update_option('leadbox-settings', $settings);

    WP_CLI::success(sprintf("lead_intake_target set to '%s'.", $target));

    if (defined('LEADBOX_LEAD_INTAKE_TARGET')) {
      WP_CLI::warning(sprintf(
        "LEADBOX_LEAD_INTAKE_TARGET is defined ('%s') in wp-config.php and OVERRIDES this option. " .
        "The effective target will not change until the constant is removed.",
        strtolower((string) LEADBOX_LEAD_INTAKE_TARGET)
      ));
    }
  }
}

Home - Capital GMC Buick Regina

No data

Welcome to Capital GMC BUICK – REGINA

Thank you for choosing Capital GMC Buick | Regina, your premier certified Buick and GMC dealership proudly serving drivers in Regina and the surrounding communities. Whether you’re searching for a brand-new Buick or GMC vehicle or a meticulously inspected pre-owned model, we have a diverse selection to match your needs and lifestyle.

Beyond our impressive inventory, we offer a seamless and stress-free financing experience through our well-connected finance centre, where our team of experts is dedicated to securing the best loan or lease options for you, quickly, transparently, and hassle-free.

But our commitment to you doesn’t stop at the sale. Our state-of-the-art service centre is staffed with skilled Buick and GMC technicians who use the latest equipment and genuine OEM parts to keep your vehicle running at its best. From routine maintenance to complex repairs, we’ve got you covered.

Experience top-tier customer service, quality vehicles, and expert care, all in one place. Visit Capital GMC Buick | Regina today or call us at 306-205-8072 with any questions. We’re here to help!

Ask a Question