Plugin Directory

Changeset 3833938


Ignore:
Timestamp:
11/29/2026 11:11:27 PM (less than one hour ago)
Author:
extnify
Message:

Release 1.1.0

Location:
extnify-fee
Files:
46 added
2 deleted
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • extnify-fee/tags/1.1.0/admin/controller.php

    r3772791 r3833938  
    11<?php
    2 use Extnify\XFee\Ocm\Form;
    3 use Extnify\XFee\Ocm\Misc;
     2use Extnify\Fee\Ui\Form;
     3use Extnify\Fee\Ui\Misc;
    44defined( 'ABSPATH' ) || exit;
    55
    … …  
    1212 *
    1313 * Shared identity with Pro (so the data table stays compatible):
    14  *   • global option / field prefix / nonce group  = `x_feepro`
    15  *   • per-method field prefix                      = `xfeepro`
     14 *   • global option / field prefix / nonce group  = `extnify_fee`
     15 *   • per-method field prefix                      = `extnify_fee`
    1616 * The admin PAGE slug is `extnify-fee` (same as Pro).
    1717 */
    18 class XFee_Back {
    19 
    20     use XFee_Woo_Helpers; // ajax_get_zones() for the Shipping Zone field
     18class Extnify_Fee_Back {
     19
     20    use Extnify_Fee_Woo_Helpers; // ajax_get_zones() for the Shipping Zone field
    2121
    2222    /** @var Form */   private $form;
    2323    /** @var Misc */   private $misc;
    24     /** @var XFee_Model */ private $model;
     24    /** @var Extnify_Fee_Model */ private $model;
    2525    /** @var array */      private $langs_data;
    2626
    27     private static function group() { return 'x_feepro'; } // shared option + field prefix + nonce
     27    private static function group() { return 'extnify_fee'; } // shared option + field prefix + nonce
    2828    private static function slug()  { return 'extnify-fee'; } // admin page slug
    2929
    30     public function __construct( XFee_Model $model ) {
     30    public function __construct( Extnify_Fee_Model $model ) {
    3131        $this->model      = $model;
    3232        $this->form       = new Form();
    … …  
    4040
    4141        // AJAX action names are prefixed with this plugin's unique group
    42         // (e.g. wp_ajax_x_feepro_load_method) so two active Extnify plugins never
     42        // (e.g. wp_ajax_extnify_fee_load_method) so two active Extnify plugins never
    4343        // register the same hook — otherwise both handlers fire on one request.
    4444        $ajax = array( 'load_method', 'save_method', 'delete_method',
    … …  
    167167
    168168    private function tab_gs_general( array $setting ) {
     169        // Default the global Sort Order to 0 when unset (new installs show 0, not blank).
     170        $setting = array_merge( array( 'sort_order' => '0' ), $setting );
    169171        $this->form->setPreset( $setting );
    170172        $html  = '<table class="form-table" role="presentation"><tbody>';
    … …  
    177179
    178180    /**
    179      * "Available in Pro Version" placeholder. On the wp.org build (XFEE_UPGRADE_URL
     181     * "Available in Pro Version" placeholder. On the wp.org build (EXTNIFY_FEE_UPGRADE_URL
    180182     * set) it links to the Pro product page; on the WooCommerce build (constant
    181183     * empty) it stays plain text — no external upsell link (Marketplace rules).
    182184     */
    183185    private function pro_placeholder( $text = null, $icon = 'dashicons-lock' ) {
    184         $url   = defined( 'XFEE_UPGRADE_URL' ) ? (string) XFEE_UPGRADE_URL : '';
     186        $url   = defined( 'EXTNIFY_FEE_UPGRADE_URL' ) ? (string) EXTNIFY_FEE_UPGRADE_URL : '';
    185187        $label = ( null === $text ) ? esc_html__( 'Available in Pro Version', 'extnify-fee' ) : esc_html( $text );
    186188        $body  = ( '' !== $url )
    … …  
    195197    /** Help & Support — support links only (the live debug log is a Pro feature). */
    196198    private function tab_gs_help() {
    197         $ver     = defined( 'XFEE_PLUGIN_VERSION' ) ? XFEE_PLUGIN_VERSION : '1.0.0';
     199        $ver     = defined( 'EXTNIFY_FEE_PLUGIN_VERSION' ) ? EXTNIFY_FEE_PLUGIN_VERSION : '1.0.0';
    198200        $wp_ver  = get_bloginfo( 'version' );
    199201        $php_ver = preg_replace( '/^(\d+\.\d+).*/', '$1', PHP_VERSION );
    … …  
    234236        // (WordPress.org build). The WooCommerce build ships an empty URL, so the
    235237        // card is dropped entirely (the marketplace owns the upsell there).
    236         if ( defined( 'XFEE_UPGRADE_URL' ) && XFEE_UPGRADE_URL ) {
    237             $html .= '<a href="' . esc_url( XFEE_UPGRADE_URL ) . '" target="_blank" rel="noopener" class="ext-hs-card ext-hs-upgrade">'
     238        if ( defined( 'EXTNIFY_FEE_UPGRADE_URL' ) && EXTNIFY_FEE_UPGRADE_URL ) {
     239            $html .= '<a href="' . esc_url( EXTNIFY_FEE_UPGRADE_URL ) . '" target="_blank" rel="noopener" class="ext-hs-card ext-hs-upgrade">'
    238240                   . '<span class="ext-hs-card-icon dashicons dashicons-star-filled"></span>'
    239241                   . '<span class="ext-hs-card-text"><strong>' . esc_html__( 'Upgrade to Pro', 'extnify-fee' ) . '</strong>'
    … …  
    328330        }
    329331
    330         $extnify = null; // the Extnify shipping method (free 'x_shipping' or pro 'x_shipping_pro').
     332        $extnify = null; // the Extnify shipping method (free 'extnify_shipping' or pro 'extnify_shipping_pro').
    331333        foreach ( WC()->shipping()->get_shipping_methods() as $method ) {
    332             if ( in_array( $method->id, array( 'x_shipping', 'x_shipping_pro' ), true ) ) {
     334            if ( in_array( $method->id, array( 'extnify_shipping', 'extnify_shipping_pro' ), true ) ) {
    333335                $extnify = $method; // expanded into rows below — don't list the collapsed type.
    334336                continue;
    … …  
    339341        if ( $extnify ) {
    340342            global $wpdb;
    341             $table = $wpdb->prefix . 'xshippingpro_methods';
     343            $table = $wpdb->prefix . 'extnify_shipping_methods';
    342344            // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- checking existence of a fixed prefixed table.
    343345            if ( $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table ) ) === $table ) {
    … …  
    376378            'shipping_all' => '1',
    377379            'tax_class_id' => '',
    378             'sort_order'   => '',
     380            'sort_order'   => '0',
    379381            'status'       => '1',
    380382            'rate_type'    => 'flat',
    … …  
    390392
    391393        $this->form
    392             ->setBasename( 'xfeepro' )
     394            ->setBasename( 'extnify_fee' )
    393395            ->setPreset( $method_data )
    394396            ->setIDPostfix( $postfix )
    … …  
    498500        $mdata   = $row ? $row['method_data'] : array();
    499501
    500         $this->form->setBasename( 'xfeepro' )->setLangs( $this->langs_data );
     502        $this->form->setBasename( 'extnify_fee' )->setLangs( $this->langs_data );
    501503        $id_postfix = $id ? (string) $id : ( $postfix ?: 'new' );
    502504        wp_send_json_success( array( 'html' => $this->get_form_data( $mdata, $id, $id_postfix ), 'id' => $id ) );
    … …  
    506508        $this->check_ajax_auth();
    507509        $id      = isset( $_POST['ext_method_id'] ) ? sanitize_text_field( wp_unslash( $_POST['ext_method_id'] ) ) : 'new'; // phpcs:ignore WordPress.Security.NonceVerification.Missing -- nonce verified in check_ajax_auth()
    508         $posted  = isset( $_POST['xfeepro'] ) ? (array) wp_unslash( $_POST['xfeepro'] ) : array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- nonce verified in check_ajax_auth(); sanitized in sanitize_method()
     510        $posted  = isset( $_POST['extnify_fee'] ) ? (array) wp_unslash( $_POST['extnify_fee'] ) : array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- nonce verified in check_ajax_auth(); sanitized in sanitize_method()
    509511        $is_new  = ( 'new' === $id || ! $id );
    510512        $mdata   = $this->sanitize_method( $posted, $is_new ? 0 : (int) $id );
    … …  
    542544        $this->check_ajax_auth();
    543545        $limit   = isset( $_REQUEST['limit'] ) ? max( 1, min( 500, (int) $_REQUEST['limit'] ) ) : 60; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- nonce verified in check_ajax_auth(); value is int-clamped
    544         $log     = get_transient( 'x_feepro_debug_log' );
     546        $log     = get_transient( 'extnify_fee_debug_log' );
    545547        $entries = array();
    546548        if ( is_array( $log ) ) {
    … …  
    559561    public function ajax_debug_clear() {
    560562        $this->check_ajax_auth();
    561         delete_transient( 'x_feepro_debug_log' );
     563        delete_transient( 'extnify_fee_debug_log' );
    562564        wp_send_json_success();
    563565    }
    … …  
    606608            return;
    607609        }
    608         $theme_path = XFEE_PLUGIN_PATH . 'assets/css/theme.css';
    609         $css_path   = XFEE_PLUGIN_PATH . 'assets/css/admin.css';
    610         $js_path    = XFEE_PLUGIN_PATH . 'assets/js/admin.js';
     610        $theme_path = EXTNIFY_FEE_PLUGIN_PATH . 'assets/css/theme.css';
     611        $css_path   = EXTNIFY_FEE_PLUGIN_PATH . 'assets/css/admin.css';
     612        $js_path    = EXTNIFY_FEE_PLUGIN_PATH . 'assets/js/admin.js';
    611613        // Shared Extnify theme (brand tokens + components) loads first…
    612         wp_enqueue_style(  'extnify-theme', XFEE_PLUGIN_URL . 'assets/css/theme.css', array(), file_exists( $theme_path ) ? filemtime( $theme_path ) : XFEE_PLUGIN_VERSION );
     614        wp_enqueue_style(  'extnify-theme', EXTNIFY_FEE_PLUGIN_URL . 'assets/css/theme.css', array(), file_exists( $theme_path ) ? filemtime( $theme_path ) : EXTNIFY_FEE_PLUGIN_VERSION );
    613615        // …then this plugin's own overrides, so they win via the cascade.
    614         wp_enqueue_style(  'extnify-fee-admin', XFEE_PLUGIN_URL . 'assets/css/admin.css', array( 'extnify-theme' ), file_exists( $css_path ) ? filemtime( $css_path ) : XFEE_PLUGIN_VERSION );
    615         wp_enqueue_script( 'extnify-fee-admin', XFEE_PLUGIN_URL . 'assets/js/admin.js', array( 'jquery', 'jquery-ui-sortable' ), file_exists( $js_path ) ? filemtime( $js_path ) : XFEE_PLUGIN_VERSION, true );
     616        wp_enqueue_style(  'extnify-fee-admin', EXTNIFY_FEE_PLUGIN_URL . 'assets/css/admin.css', array( 'extnify-theme' ), file_exists( $css_path ) ? filemtime( $css_path ) : EXTNIFY_FEE_PLUGIN_VERSION );
     617        wp_enqueue_script( 'extnify-fee-admin', EXTNIFY_FEE_PLUGIN_URL . 'assets/js/admin.js', array( 'jquery', 'jquery-ui-sortable' ), file_exists( $js_path ) ? filemtime( $js_path ) : EXTNIFY_FEE_PLUGIN_VERSION, true );
    616618        wp_localize_script( 'extnify-fee-admin', 'extnifyFeeAdmin', array(
    617619            'ajaxUrl'     => admin_url( 'admin-ajax.php' ),
    … …  
    634636        // basename() strips any path components, so $template can only resolve to a
    635637        // file inside admin/views/ — no directory traversal via the include below.
    636         $file = XFEE_PLUGIN_PATH . 'admin/views/' . basename( (string) $template ) . '.php';
     638        $file = EXTNIFY_FEE_PLUGIN_PATH . 'admin/views/' . basename( (string) $template ) . '.php';
    637639        if ( ! file_exists( $file ) ) {
    638640            return;
  • extnify-fee/tags/1.1.0/admin/model.php

    r3751128 r3833938  
    44 *
    55 * IMPORTANT: this reads/writes the SAME table as the paid Extnify Fee Rules Pro
    6  * (`{prefix}xfeepro_methods`) so a customer can move between free and paid
     6 * (`{prefix}extnify_fee_methods`) so a customer can move between free and paid
    77 * without losing their configured methods. Pro writes a superset of fields into
    88 * the `method_data` JSON; the free plugin simply reads the subset it understands
    … …  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 class XFee_Model {
     13class Extnify_Fee_Model {
    1414
    1515    private $table;
    … …  
    1717    public function __construct() {
    1818        global $wpdb;
    19         $this->table = $wpdb->prefix . 'xfeepro_methods';
     19        $this->table = $wpdb->prefix . 'extnify_fee_methods';
    2020    }
    2121
    2222    // ── Schema (shared table — CREATE IF NOT EXISTS, so either plugin may make it) ─
    2323
     24    /** DB schema version -- bump when the table schema below changes. */
     25    const DB_VERSION        = '1.0.0';
     26    /** Per-plugin option storing the installed schema version. */
     27    const DB_VERSION_OPTION = 'extnify_fee_db_version';
     28
     29    /**
     30     * Idempotent schema sync. Runs on activation AND on every request (cheap option
     31     * check); when the stored version is behind the code it re-runs dbDelta, so a
     32     * plugin UPDATE that adds a column actually alters the live table (the activation
     33     * hook does not fire on updates). dbDelta only adds/modifies columns, never drops.
     34     */
     35    public static function maybe_upgrade() {
     36        global $wpdb;
     37        if ( get_option( self::DB_VERSION_OPTION ) === self::DB_VERSION ) {
     38            // Version says current — but verify the table actually EXISTS before trusting
     39            // it. An uninstall/DB-reset can drop the table yet leave this option behind,
     40            // which would otherwise block re-creation. Self-heal if it's gone.
     41            $table = ( new self() )->table;
     42            if ( $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table ) ) === $table ) {
     43                return;
     44            }
     45        }
     46        self::create_table();
     47        update_option( self::DB_VERSION_OPTION, self::DB_VERSION );
     48    }
     49
    2450    public static function create_table() {
    2551        global $wpdb;
    26         $table           = $wpdb->prefix . 'xfeepro_methods';
     52        $table           = $wpdb->prefix . 'extnify_fee_methods';
    2753        $charset_collate = $wpdb->get_charset_collate();
    2854        $sql = "CREATE TABLE IF NOT EXISTS {$table} (
    … …  
    3965    public static function drop_table() {
    4066        global $wpdb;
    41         $table = $wpdb->prefix . 'xfeepro_methods';
     67        $table = $wpdb->prefix . 'extnify_fee_methods';
    4268        // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, PluginCheck.Security.DirectDB.UnescapedDBParameter -- table name is $wpdb->prefix + a fixed string; identifiers can't be bound via prepare().
    4369        $wpdb->query( "DROP TABLE IF EXISTS {$table}" );
  • extnify-fee/tags/1.1.0/assets/css/admin.css

    r3751128 r3833938  
    33
    44   The shared look (brand tokens + all components) lives in the Extnify theme:
    5    assets/css/theme.css, injected at build from shared-resources-wp/common/theme/.
     5   assets/css/theme.css, injected at build from shared-resources/theme/.
    66   It loads FIRST; this file loads after it, so anything here overrides the theme.
    77
  • extnify-fee/tags/1.1.0/assets/css/theme.css

    r3751128 r3833938  
    88   -------------------------------------------------------------------------- */
    99:root {
    10     /* Accent - WooCommerce purple */
    11     --extnify-accent:        #7f54b3;
    12     --extnify-accent-dark:   #6d3f9e;
    13     --extnify-accent-darker: #5a3a8a;
    14     --extnify-accent-tint:   #f5f0fb;
    15     --extnify-accent-tint-2: #efe9fa;
    16     --extnify-accent-border: #c4aee3;
     10    /* Accent - Extnify blue */
     11    --extnify-accent:        #3863e9;
     12    --extnify-accent-dark:   #2a4ed2;   /* hover   */
     13    --extnify-accent-darker: #1f3eb0;   /* pressed */
     14    --extnify-accent-tint:   #eef2fd;   /* selected background */
     15    --extnify-accent-tint-2: #e1e7fc;   /* hover background */
     16    --extnify-accent-border: #b4c4f7;
     17    --extnify-accent-ring:   rgba(56, 99, 233, .2);   /* focus ring */
    1718
    1819    /* Text (WordPress admin neutrals) */
    … …  
    2627    --extnify-bg:            #f6f7f7;
    2728    --extnify-bg-soft:       #f0f0f1;
    28     --extnify-border:        #c3c4c7;
    29     --extnify-border-light:  #e2e2e4;
     29    --extnify-border:        #dcdcde;
     30    --extnify-border-light:  #e2e4e7;
     31    --extnify-border-input:  #8c8f94;
    3032
    3133    /* Semantic */
    32     --extnify-link:          #2271b1;
     34    --extnify-link:          #3863e9;
    3335    --extnify-danger:        #d63638;
    34     --extnify-success:       #4b8a5c;
     36    --extnify-danger-tint:   #fcf0f1;
     37    --extnify-success:       #007a3d;
     38    --extnify-success-tint:  #e6f4ea;
     39    --extnify-warning:       #996800;
     40
     41    /* Shape */
     42    --extnify-radius-sm:     6px;   /* inputs, buttons, list items */
     43    --extnify-radius:        8px;   /* small cards */
     44    --extnify-radius-lg:     12px;  /* page-level cards */
     45    --extnify-shadow:        0 1px 2px rgba(0, 0, 0, .04);
    3546
    3647    /* Typography */
    … …  
    4354.ext-wrap {
    4455    max-width: 100%;
     56}
     57
     58/* --------------------------------------------------------------------------
     59   Buttons — one system for every Extnify screen.
     60   WordPress 7 gives core .button a 40px min-height, 38px line-height and
     61   2px corners, and any padding we add stacks on top of that (52px-tall
     62   square buttons). Reset it once here: 36px, 6px corners, centred content.
     63   `.ext-wrap .button` (0,2,0) beats `.wp-core-ui .button` by load order.
     64     .button                → secondary (white, grey border)
     65     .button.button-primary → primary (accent)
     66     .button.button-small   → compact (30px)
     67   -------------------------------------------------------------------------- */
     68.ext-wrap .button {
     69    display: inline-flex;
     70    align-items: center;
     71    justify-content: center;
     72    gap: 6px;
     73    min-height: 36px;
     74    height: auto;
     75    padding: 0 14px;
     76    line-height: 1.2;
     77    font-size: 13px;
     78    font-weight: 600;
     79    color: var(--extnify-text-soft);
     80    background: var(--extnify-surface);
     81    border: 1px solid var(--extnify-border);
     82    border-radius: var(--extnify-radius-sm);
     83    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
     84    text-decoration: none;
     85    vertical-align: middle;
     86    cursor: pointer;
     87    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
     88}
     89
     90.ext-wrap .button:hover {
     91    color: var(--extnify-accent-dark);
     92    background: var(--extnify-accent-tint);
     93    border-color: var(--extnify-accent-border);
     94}
     95
     96.ext-wrap .button:active {
     97    background: var(--extnify-accent-tint-2);
     98    box-shadow: none;
     99}
     100
     101.ext-wrap .button:focus {
     102    outline: none;
     103    color: var(--extnify-accent-dark);
     104    border-color: var(--extnify-accent);
     105    box-shadow: 0 0 0 3px var(--extnify-accent-ring);
     106}
     107
     108.ext-wrap .button.button-primary {
     109    color: #fff;
     110    background: var(--extnify-accent);
     111    border-color: var(--extnify-accent);
     112    box-shadow: 0 1px 2px color-mix(in srgb, var(--extnify-accent) 35%, transparent);
     113}
     114
     115.ext-wrap .button.button-primary:hover {
     116    color: #fff;
     117    background: var(--extnify-accent-dark);
     118    border-color: var(--extnify-accent-dark);
     119}
     120
     121.ext-wrap .button.button-primary:active {
     122    background: var(--extnify-accent-darker);
     123    border-color: var(--extnify-accent-darker);
     124    box-shadow: none;
     125}
     126
     127.ext-wrap .button.button-primary:focus {
     128    color: #fff;
     129    border-color: var(--extnify-accent);
     130    box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--extnify-accent);
     131}
     132
     133.ext-wrap .button.button-small {
     134    min-height: 30px;
     135    padding: 0 10px;
     136    font-size: 12px;
     137}
     138
     139.ext-wrap .button:disabled,
     140.ext-wrap .button[disabled],
     141.ext-wrap .button.disabled {
     142    opacity: .55;
     143    cursor: not-allowed;
     144    box-shadow: none;
     145}
     146
     147.ext-wrap .button .dashicons {
     148    font-size: 16px;
     149    width: 16px;
     150    height: 16px;
     151    line-height: 1;
     152    margin: 0;
     153    flex-shrink: 0;
    45154}
    46155
    … …  
    99208    min-height: 600px;
    100209    background: var(--extnify-surface);
    101     border: 1px solid var(--extnify-border);
    102     border-radius: 4px;
     210    border: 1px solid var(--extnify-border-light);
     211    border-radius: var(--extnify-radius-lg);
     212    box-shadow: var(--extnify-shadow);
    103213    overflow: hidden;
    104214}
    … …  
    111221    flex-shrink: 0;
    112222    /* background: #fafafa; */
    113     border-right: 1px solid #e0e0e2;
     223    border-right: 1px solid var(--extnify-border-light);
    114224    min-height: 600px;
    115225    display: flex;
    … …  
    118228
    119229.ext-sidebar-section {
    120     border-bottom: 1px solid #e0e0e2;
     230    border-bottom: 1px solid var(--extnify-border-light);
    121231}
    122232
    … …  
    176286    flex-direction: column;
    177287    gap: 5px;
    178     background: #fafafa
     288    background: var(--extnify-bg)
    179289}
    180290
    … …  
    187297    cursor: pointer;
    188298    font-size: 12.5px;
    189     color: #2c2c2c;
     299    color: var(--extnify-text);
    190300    background: var(--extnify-surface);
    191301    border: 1px solid var(--extnify-border-light);
    192     border-radius: 6px;
    193     border-left: 3px solid #d0c8e0;
     302    border-radius: var(--extnify-radius);
    194303    transition: border-color .15s, box-shadow .15s, background .15s;
    195304    position: relative;
    … …  
    197306
    198307.ext-method-item:hover {
    199     border-color: #b49fd4;
    200     border-left-color: var(--extnify-accent);
    201     box-shadow: 0 1px 4px rgba(127,84,179,.1);
    202     background: #faf8fd;
     308    border-color: var(--extnify-accent-border);
     309    background: var(--extnify-accent-tint);
    203310}
    204311
    … …  
    210317.ext-method-item.ui-sortable-helper {
    211318    cursor: grabbing;
    212     box-shadow: 0 4px 12px rgba(127,84,179,.25);
     319    box-shadow: 0 4px 12px color-mix(in srgb, var(--extnify-accent) 25%, transparent);
    213320}
    214321
    215322.ext-sort-placeholder {
    216     border: 1px dashed #b49fd4 !important;
     323    border: 1px dashed var(--extnify-accent-border) !important;
    217324    background: var(--extnify-accent-tint) !important;
     325    border-radius: var(--extnify-radius);
    218326    visibility: visible !important;
    219327}
    … …  
    222330    background: var(--extnify-accent-tint);
    223331    border-color: var(--extnify-accent);
    224     border-left-color: var(--extnify-accent);
    225     border-left-width: 4px;
    226     box-shadow: 0 2px 6px rgba(127,84,179,.15);
    227     color: var(--extnify-accent-darker);
     332    box-shadow: 0 0 0 3px var(--extnify-accent-ring);
     333    color: var(--extnify-accent);
    228334    font-weight: 600;
    229335}
    230336
    231337.ext-method-item.ext-nav-active .ext-method-label {
    232     color: var(--extnify-accent-darker);
     338    color: var(--extnify-accent);
    233339}
    234340
    … …  
    255361
    256362.ext-method-active .ext-method-status-dot {
    257     background: #eafbea;
    258     color: #2a7a2e;
    259     border: 1px solid #b3e6b5;
     363    background: var(--extnify-success-tint);
     364    color: var(--extnify-success);
     365    border: 1px solid transparent;
    260366    content: 'On';
    261367}
    262368
    263369.ext-method-inactive .ext-method-status-dot {
    264     background: #fdf0f0;
    265     color: #a02020;
    266     border: 1px solid #f5c6c6;
     370    background: var(--extnify-danger-tint);
     371    color: var(--extnify-danger);
     372    border: 1px solid transparent;
    267373}
    268374
    … …  
    283389.ext-add-method-wrap {
    284390    padding: 12px 14px;
    285     border-top: 1px solid #e0e0e2;
     391    border-top: 1px solid var(--extnify-border-light);
    286392    margin-top: auto;
    287     background: #fafafa;
     393    background: var(--extnify-bg);
    288394}
    289395
    290396.ext-add-method-wrap .button {
    291397    width: 100%;
    292     justify-content: center;
    293     display: flex;
    294     align-items: center;
    295     gap: 6px;
     398    min-height: 40px;
     399    color: #fff;
    296400    background: var(--extnify-accent);
    297401    border-color: var(--extnify-accent);
    298     color: var(--extnify-surface);
    299     font-weight: 600;
    300     font-size: 13px;
    301     padding: 7px 0;
    302     height: auto;
    303     border-radius: 4px;
    304     box-shadow: none;
    305     transition: background .15s, border-color .15s;
     402    box-shadow: 0 1px 2px color-mix(in srgb, var(--extnify-accent) 35%, transparent);
    306403}
    307404
    … …  
    310407    background: var(--extnify-accent-dark);
    311408    border-color: var(--extnify-accent-dark);
    312     color: var(--extnify-surface);
    313     box-shadow: none;
     409    color: #fff;
    314410}
    315411
    316412.ext-add-method-wrap .button .dashicons {
    317     font-size: 15px;
    318     width: 15px;
    319     height: 15px;
    320     line-height: 1;
    321     margin-top: 1px;
    322     flex-shrink: 0;
     413    font-size: 16px;
     414    width: 16px;
     415    height: 16px;
    323416}
    324417
    … …  
    348441    align-items: flex-end;
    349442    justify-content: space-between;
    350     border-bottom: 2px solid var(--extnify-border-light);
     443    border-bottom: 1px solid var(--extnify-border);
    351444    margin-bottom: 20px;
    352445    gap: 12px;
    … …  
    362455
    363456.ext-global-save-wrap .button {
    364     display: inline-flex;
    365     align-items: center;
    366     font-size: 13px;
    367     font-weight: 600;
    368     padding: 5px 16px;
    369     height: auto;
    370     line-height: 1.6;
    371     box-shadow: none;
    372     transition: background .15s, border-color .15s;
     457    /* Sizing comes from the shared button system above. */
     458    flex-shrink: 0;
    373459}
    374460
    … …  
    377463    width: 16px;
    378464    height: 16px;
    379     line-height: 1;
    380     display: flex;
    381     align-items: center;
    382     justify-content: center;
    383465}
    384466
    385467.ext-global-save-wrap .button-primary {
    386468    background: var(--extnify-accent);
    387     border-color: var(--extnify-accent-dark);
     469    border-color: var(--extnify-accent);
    388470}
    389471
    … …  
    391473.ext-global-save-wrap .button-primary:focus {
    392474    background: var(--extnify-accent-dark);
    393     border-color: #5c3185;
     475    border-color: var(--extnify-accent-darker);
    394476    box-shadow: none;
    395477}
    … …  
    414496    background: transparent;
    415497    border: none;
    416     border-bottom: 3px solid transparent;
     498    border-bottom: 2px solid transparent;
    417499    border-radius: 0;
    418500    padding: 8px 14px;
    419     margin-bottom: -2px;
     501    margin-bottom: -1px;
    420502    text-decoration: none;
    421503    transition: color .15s, border-color .15s;
    … …  
    434516.ext-subtab-nav .nav-tab-active:hover {
    435517    color: var(--extnify-accent);
    436     font-weight: 700;
     518    font-weight: 600;
    437519    background: transparent;
    438     border-bottom: 3px solid var(--extnify-accent);
     520    border-bottom: 2px solid var(--extnify-accent);
    439521    box-shadow: none;
    440522}
    … …  
    474556}
    475557
    476 /* Icon-only action buttons (label shown via the native title tooltip) */
    477 .ext-icon-btn {
    478     display: inline-flex !important;
    479     align-items: center;
    480     justify-content: center;
    481     width: 32px;
    482     height: 30px;
    483     min-height: 30px;
    484     padding: 0 !important;
     558/* Icon-only action buttons (label shown via the native title tooltip).
     559   Save = primary; Copy / Clear cache = secondary; Delete = secondary with a
     560   red icon. One accent, never a row of differently colored blocks. */
     561.ext-wrap .ext-icon-btn {
     562    width: 36px;
     563    min-width: 36px;
     564    min-height: 36px;
     565    height: 36px;
     566    padding: 0;
    485567    font-size: 0;                /* collapse the helper's trailing &nbsp; */
    486     border: none !important;
    487     border-radius: 4px;
    488     color: var(--extnify-surface) !important;
    489     transition: filter .12s ease, transform .06s ease;
    490 }
    491 
    492 .ext-icon-btn:hover  { filter: brightness(1.08); }
    493 .ext-icon-btn:active { transform: translateY(1px); }
    494 
    495 .ext-icon-btn .dashicons {
     568}
     569
     570.ext-wrap .ext-icon-btn .dashicons {
    496571    font-size: 18px;
    497     width: 17px;
    498     height: 17px;
    499     line-height: 1;
    500     margin-bottom: 15px;
    501     color: var(--extnify-surface);
    502 }
    503 
    504 /* Solid colored actions (OpenCart-style) */
    505 .ext-method-save    { background: #2ea043 !important; }   /* green  */
    506 .ext-method-copy    { background: #f0ad4e !important; }   /* orange */
    507 .ext-method-delete  { background: #e5484d !important; }   /* red    */
    508 .ext-toolbar-save   { background: var(--extnify-accent) !important; }   /* purple */
    509 .ext-clear-cache    { background: #2f6fed !important; }   /* blue   */
     572    width: 18px;
     573    height: 18px;
     574}
     575
     576.ext-wrap .ext-method-save,
     577.ext-wrap .ext-toolbar-save {
     578    color: #fff;
     579    background: var(--extnify-accent);
     580    border-color: var(--extnify-accent);
     581    box-shadow: 0 1px 2px color-mix(in srgb, var(--extnify-accent) 35%, transparent);
     582}
     583
     584.ext-wrap .ext-method-save:hover,
     585.ext-wrap .ext-toolbar-save:hover,
     586.ext-wrap .ext-method-save:focus,
     587.ext-wrap .ext-toolbar-save:focus {
     588    color: #fff;
     589    background: var(--extnify-accent-dark);
     590    border-color: var(--extnify-accent-dark);
     591}
     592
     593.ext-wrap .ext-method-delete {
     594    color: var(--extnify-danger);
     595}
     596
     597.ext-wrap .ext-method-delete:hover,
     598.ext-wrap .ext-method-delete:focus {
     599    color: var(--extnify-danger);
     600    background: var(--extnify-danger-tint);
     601    border-color: var(--extnify-danger);
     602}
     603
     604.ext-wrap .ext-method-delete:focus {
     605    box-shadow: 0 0 0 3px color-mix(in srgb, var(--extnify-danger) 20%, transparent);
     606}
    510607
    511608.ext-method-id-badge {
    … …  
    513610    background: var(--extnify-bg-soft);
    514611    padding: 2px 8px;
    515     border-radius: 3px;
     612    border-radius: 4px;
    516613    font-family: monospace;
    517614    font-size: 13px;
    … …  
    525622    margin-bottom: 20px;
    526623    padding-bottom: 0;
    527     border-bottom: 2px solid var(--extnify-border-light);
     624    border-bottom: 1px solid var(--extnify-border);
    528625}
    529626
    … …  
    534631    background: transparent;
    535632    border: none;
    536     border-bottom: 3px solid transparent;
     633    border-bottom: 2px solid transparent;
    537634    border-radius: 0;
    538635    padding: 8px 14px;
    539     margin-bottom: -2px;
     636    margin-bottom: -1px;
    540637    text-decoration: none;
    541638    transition: color .15s, border-color .15s;
    … …  
    554651.ext-mtab-nav .nav-tab-active:hover {
    555652    color: var(--extnify-accent);
    556     font-weight: 700;
     653    font-weight: 600;
    557654    background: transparent;
    558     border-bottom: 3px solid var(--extnify-accent);
     655    border-bottom: 2px solid var(--extnify-accent);
    559656    box-shadow: none;
    560657}
    … …  
    600697    padding: 6px 10px;
    601698    height: auto;
    602     border-radius: 4px;
     699    border-radius: var(--extnify-radius-sm);
    603700    border: 1px solid var(--extnify-border);
    604701    box-shadow: none;
    … …  
    621718    padding: 0px 8px;
    622719    height: auto;
    623     border-radius: 4px;
     720    border-radius: var(--extnify-radius-sm);
    624721    border: 1px solid var(--extnify-border);
    625722    min-width: 175px;
    … …  
    638735    font-size: 13px;
    639736    padding: 6px 10px;
    640     border-radius: 4px;
     737    border-radius: var(--extnify-radius-sm);
    641738    border: 1px solid var(--extnify-border);
    642739    width: 100%;
    … …  
    689786/* Alternating row tint */
    690787.ext-wrap .form-table tr:nth-child(even) {
    691     background: #fafafa;
     788    background: var(--extnify-bg);
    692789}
    693790
    … …  
    743840    font-size: 13px;
    744841    border-color: var(--extnify-accent-border);
    745     border-radius: 4px;
     842    border-radius: var(--extnify-radius-sm);
    746843}
    747844
    … …  
    756853    max-height: 180px;
    757854    overflow-y: auto;
    758     border: 1px solid #e0d8ef;
    759     border-radius: 4px;
     855    border: 1px solid var(--extnify-border-light);
     856    border-radius: var(--extnify-radius-sm);
    760857    padding: 8px 10px;
    761858    background: var(--extnify-surface);
    … …  
    805902    height: 36px;
    806903    border-color: var(--extnify-accent-border);
    807     border-radius: 4px;
     904    border-radius: var(--extnify-radius-sm);
    808905    flex-shrink: 0;
    809906}
    … …  
    821918    min-width: 250px;
    822919    border: 1px solid var(--extnify-accent-border);
    823     border-radius: 4px;
     920    border-radius: var(--extnify-radius-sm);
    824921    background: var(--extnify-surface);
    825922    padding: 5px 8px;
    … …  
    865962    background: var(--extnify-surface);
    866963    border: 1px solid var(--extnify-border);
    867     border-radius: 3px;
     964    border-radius: 4px;
    868965    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    869966    max-height: 180px;
    … …  
    9101007    text-decoration: none;
    9111008    padding: 4px 12px;
    912     border-radius: 4px;
    913     background: #e0e0e0;
     1009    border-radius: var(--extnify-radius-sm);
     1010    background: var(--extnify-border-light);
    9141011    transition: background-color .15s ease, color .15s ease;
    9151012}
    … …  
    9621059    color: var(--extnify-surface);
    9631060    padding: 2px 6px;
    964     border-radius: 3px;
     1061    border-radius: 4px;
    9651062    font-size: 12px;
    9661063}
    … …  
    9831080    background: var(--extnify-surface);
    9841081    border: 1px solid var(--extnify-border);
    985     border-radius: 3px;
     1082    border-radius: 4px;
    9861083    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    9871084    min-width: 240px;
    … …  
    10701167.ext-range-container td {
    10711168    padding: 4px 6px;
    1072     border: 1px solid #e0e0e0;
     1169    border: 1px solid var(--extnify-border-light);
    10731170    vertical-align: middle;
    10741171}
    … …  
    11071204    padding: 4px 8px;
    11081205    border: 1px solid #dcdcde;
    1109     border-radius: 3px;
     1206    border-radius: 4px;
    11101207}
    11111208
    … …  
    11911288    letter-spacing: 0.06em;
    11921289    padding: 8px 12px;
    1193     border: 1px solid #e0d8ef;
     1290    border: 1px solid var(--extnify-border-light);
    11941291    text-align: left;
    11951292    white-space: nowrap;
    … …  
    12011298.ext-group-table td {
    12021299    padding: 6px 10px;
    1203     border: 1px solid #ebebed;
     1300    border: 1px solid var(--extnify-border-light);
    12041301    vertical-align: middle;
    12051302    background: var(--extnify-surface);
    … …  
    12071304
    12081305.ext-group-table tbody tr:nth-child(even) td {
    1209     background: #faf8fd;
     1306    background: var(--extnify-accent-tint);
    12101307}
    12111308
    … …  
    12251322    padding: 4px 6px;
    12261323    height: auto;
    1227     border-radius: 3px;
     1324    border-radius: 4px;
    12281325    border: 1px solid var(--extnify-border);
    12291326    box-shadow: none;
    … …  
    12441341    padding: 4px 8px;
    12451342    height: auto;
    1246     border-radius: 3px;
     1343    border-radius: 4px;
    12471344    border: 1px solid var(--extnify-border);
    12481345    width: 100%;
    … …  
    12661363    gap: 10px;
    12671364    background: var(--extnify-accent-tint);
    1268     border: 1px solid #d4c4ef;
     1365    border: 1px solid var(--extnify-accent-border);
    12691366    border-left: 4px solid var(--extnify-accent);
    1270     border-radius: 4px;
     1367    border-radius: var(--extnify-radius-sm);
    12711368    padding: 12px 14px;
    12721369    margin-bottom: 16px;
    … …  
    12861383    margin: 0 0 4px;
    12871384    line-height: 1.5;
    1288     color: #3d2664;
     1385    color: var(--extnify-text-soft);
    12891386}
    12901387
    … …  
    13181415
    13191416.ext-callout-body code {
    1320     background: rgba(127,84,179,.12);
     1417    background: color-mix(in srgb, var(--extnify-accent) 12%, transparent);
    13211418    color: var(--extnify-accent-darker);
    13221419    padding: 1px 5px;
    1323     border-radius: 3px;
     1420    border-radius: 4px;
    13241421    font-size: 12px;
    13251422    font-family: monospace;
    … …  
    13341431.ext-hs {
    13351432    display: grid;
    1336     grid-template-columns: minmax(320px, 430px) minmax(0, 480px);
    1337     justify-content: space-between;
     1433    /* Help column on the left; the log lives in a flexible track (1fr) that can never
     1434       overflow the container — so the panel stays on the right AND is always fully
     1435       visible, however wide the admin screen is (no more clipping at the edge). */
     1436    grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
    13381437    gap: 22px;
    13391438    align-items: stretch;
    1340     padding: 8px 2px 24px;
     1439    padding: 8px 8px 24px;
    13411440}
    13421441.ext-hs[data-log-open="0"] { grid-template-columns: minmax(320px, 430px); }
    … …  
    14101509.ext-hs-update  .ext-hs-card-icon { background: #e7f6ec; color: #38a355; }
    14111510.ext-hs-ext     .ext-hs-card-icon { background: #fdf1dc; color: #e0921a; }
     1511.ext-hs-upgrade .ext-hs-card-icon { background: var(--extnify-accent); color: #fff; }
    14121512
    14131513.ext-hs-card-text { display: flex; flex-direction: column; flex: 1; line-height: 1.35; }
    … …  
    14271527    border-radius: 16px; box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
    14281528    overflow: hidden;
    1429     /* Fixed height so the panel is the same size on every filter (All/Info/Warn/
    1430        Error/Debug) — the body just scrolls within it. Sized to the viewport so
    1431        header + body + footer stay on-screen (no page scroll). */
    14321529    min-height: 0;
     1530    /* Fallback height before JS runs. The real sizing is done by hsSizeLog() in
     1531       admin.js, which measures the panel's ACTUAL top offset and sets the height so
     1532       the whole panel (incl. footer) fits the viewport, whatever sits above it. */
    14331533    height: calc(100vh - 280px);
    14341534    align-self: start;
     1535    /* Sit at the right of the flexible track, at a sensible reading width. The track
     1536       bounds it, so it can't be clipped; margin-left:auto pins it to the right. */
     1537    width: 100%;
     1538    max-width: 520px;
     1539    margin-left: auto;
    14351540}
    14361541.ext-hs-log-head {
    14371542    display: flex; align-items: center; gap: 12px;
    1438     padding: 15px 18px; border-bottom: 1px solid #f0f0f4;
     1543    padding: 15px 18px; border-bottom: 1px solid var(--extnify-bg-soft);
    14391544    background: var(--extnify-accent-dark);
    14401545}
    … …  
    14621567.ext-hs-log-tools {
    14631568    display: flex; align-items: center; gap: 12px;
    1464     padding: 11px 16px; border-bottom: 1px solid #f4f4f7;
     1569    padding: 11px 16px; border-bottom: 1px solid var(--extnify-bg-soft);
    14651570}
    14661571.ext-hs-filters { display: flex; gap: 3px; flex: 1; flex-wrap: wrap; }
    … …  
    14691574    font-size: 13px; color: #6b6f76; padding: 5px 12px; border-radius: 20px;
    14701575}
    1471 .ext-hs-filter:hover { background: #f4f4f7; }
     1576.ext-hs-filter:hover { background: var(--extnify-bg-soft); }
    14721577.ext-hs-filter.active { background: var(--extnify-text); color: var(--extnify-surface); }
    14731578.ext-hs-tools-right { display: flex; align-items: center; gap: 12px; }
    … …  
    15351640
    15361641.ext-hs-lvl-info  .ext-hs-bubble { background: #f3f8fd; border-color: #dcebf8; }
    1537 .ext-hs-lvl-debug .ext-hs-bubble { background: #f7f4fc; border-color: #e6dcf4; }
     1642.ext-hs-lvl-debug .ext-hs-bubble { background: var(--extnify-accent-tint); border-color: var(--extnify-accent-tint-2); }
    15381643.ext-hs-lvl-warn  .ext-hs-bubble { background: #fdf8ec; border-color: #f2e4c3; }
    15391644.ext-hs-lvl-error .ext-hs-bubble { background: #fdf1f1; border-color: #f4d4d4; }
    … …  
    15421647.ext-hs-log-foot {
    15431648    display: flex; align-items: center; justify-content: space-between;
    1544     padding: 12px 16px; border-top: 1px solid #f0f0f4;
     1649    padding: 12px 16px; border-top: 1px solid var(--extnify-bg-soft);
    15451650}
    15461651.ext-hs-conn { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #82868b; }
    1547 .ext-hs .ext-hs-history.button {
     1652.ext-wrap .ext-hs .ext-hs-history.button {
    15481653    background: var(--extnify-text); border-color: var(--extnify-text); color: var(--extnify-surface);
    1549     border-radius: 8px; box-shadow: none;
    1550     display: inline-flex; align-items: center; gap: 5px; padding: 5px 13px; height: auto;
    1551 }
    1552 .ext-hs .ext-hs-history.button:hover { background: #000; border-color: #000; }
    1553 .ext-hs .ext-hs-history .dashicons { font-size: 15px; width: 15px; height: 27px; }
     1654}
     1655.ext-wrap .ext-hs .ext-hs-history.button:hover,
     1656.ext-wrap .ext-hs .ext-hs-history.button:focus { background: #000; border-color: #000; color: var(--extnify-surface); }
    15541657
    15551658@media (max-width: 1100px) {
    15561659    .ext-hs, .ext-hs[data-log-open="1"] { grid-template-columns: 1fr; }
     1660    /* Stacked: full-width instead of a right-pinned 520px panel. */
     1661    .ext-hs-log { max-width: none; margin-left: 0; }
    15571662}
    15581663
    … …  
    15641669    background: var(--extnify-surface);
    15651670    border: 1px solid var(--extnify-border);
    1566     border-radius: 4px;
     1671    border-radius: var(--extnify-radius-sm);
    15671672}
    15681673
    … …  
    16051710    gap: 12px;
    16061711    background: var(--extnify-surface);
    1607     border: 1px solid #e0d8ef;
     1712    border: 1px solid var(--extnify-border-light);
    16081713    border-radius: 6px;
    16091714    padding: 18px 20px;
    … …  
    16151720    gap: 8px;
    16161721    padding-bottom: 10px;
    1617     border-bottom: 1px solid #f0ebfa;
     1722    border-bottom: 1px solid var(--extnify-accent-tint-2);
    16181723}
    16191724
    … …  
    16491754    border: 1px solid #f0c040;
    16501755    border-left: 3px solid #dba617;
    1651     border-radius: 3px;
     1756    border-radius: 4px;
    16521757    padding: 7px 10px;
    16531758    font-size: 12px;
    … …  
    16831788
    16841789.ext-wrap .ext-file-label {
    1685     display: inline-flex;
    1686     align-items: center;
    1687     gap: 5px;
    1688     font-size: 12px;
    1689     cursor: pointer;
    16901790    flex-shrink: 0;
    1691     padding: 4px 10px;
    1692     height: auto;
    1693     line-height: 1;
    1694 }
    1695 
    1696 .ext-file-label:focus-within {
     1791}
     1792
     1793.ext-wrap .ext-file-label:focus-within {
    16971794    border-color: var(--extnify-accent);
    1698     box-shadow: 0 0 0 1px var(--extnify-accent);
     1795    box-shadow: 0 0 0 3px var(--extnify-accent-ring);
    16991796}
    17001797
    … …  
    17251822.ext-wrap a.ext-io-btn:link,
    17261823.ext-wrap a.ext-io-btn:visited {
    1727     display: inline-flex;
    1728     align-items: center;
    1729     gap: 6px;
     1824    color: #fff;
    17301825    background: var(--extnify-accent);
    1731     border-color: var(--extnify-accent-dark);
    1732     color: var(--extnify-surface);
    1733     font-weight: 600;
    1734     font-size: 13px;
    1735     padding: 6px 14px;
    1736     height: auto;
    1737     box-shadow: none;
    1738     text-decoration: none;
    1739     transition: background .15s, border-color .15s;
     1826    border-color: var(--extnify-accent);
     1827    box-shadow: 0 1px 2px color-mix(in srgb, var(--extnify-accent) 35%, transparent);
    17401828}
    17411829
    … …  
    17431831.ext-wrap .ext-io-btn:focus {
    17441832    background: var(--extnify-accent-dark);
    1745     border-color: #5c3185;
    1746     color: var(--extnify-surface);
    1747     box-shadow: none;
     1833    border-color: var(--extnify-accent-dark);
     1834    color: #fff;
    17481835}
    17491836
    17501837.ext-wrap .ext-io-btn .dashicons,
    17511838.ext-wrap .ext-file-label .dashicons {
    1752     font-size: 15px;
    1753     width: 15px;
    1754     height: 15px;
    1755     line-height: 1;
    1756     flex-shrink: 0;
    1757     vertical-align: middle;
     1839    font-size: 16px;
     1840    width: 16px;
     1841    height: 16px;
    17581842}
    17591843
    … …  
    17611845.ext-wrap a.ext-io-btn-export:link,
    17621846.ext-wrap a.ext-io-btn-export:visited {
    1763     background: var(--extnify-link);
    1764     border-color: #135e96;
    1765     color: var(--extnify-surface);
     1847    color: #fff;
    17661848}
    17671849
    17681850.ext-wrap .ext-io-btn-export:hover,
    17691851.ext-wrap .ext-io-btn-export:focus {
    1770     background: #135e96;
    1771     border-color: #0a4b78;
    1772     color: var(--extnify-surface);
     1852    color: #fff;
    17731853}
    17741854
    … …  
    18041884        border-left: none;
    18051885        border: 1px solid var(--extnify-border);
    1806         border-radius: 3px;
     1886        border-radius: 4px;
    18071887        padding: 6px 10px;
    18081888    }
    … …  
    20072087   group rows and align its label + dropdown with the columns above. */
    20082088.ext-group-table tfoot .ext-group-foot-row td {
    2009     border-top: 2px solid #d9cded;
     2089    border-top: 2px solid var(--extnify-accent-border);
    20102090    background: var(--extnify-accent-tint);
    20112091}
    … …  
    21212201    font-style: normal;
    21222202    text-decoration: none;
    2123     border: 1px solid #b7d3ea;
     2203    border: 1px solid var(--extnify-accent-border);
    21242204    border-radius: 20px;
    2125     background: #f0f6fc;
     2205    background: var(--extnify-accent-tint);
    21262206}
    21272207
    … …  
    21372217    padding: 12px 14px;
    21382218    background: var(--extnify-bg);
    2139     border: 1px solid #e0e0e0;
    2140     border-radius: 4px;
     2219    border: 1px solid var(--extnify-border-light);
     2220    border-radius: var(--extnify-radius-sm);
    21412221    font-size: 13px;
    21422222    line-height: 1.5;
    … …  
    21532233    background: #e5f4fb;
    21542234    border: 1px solid #b6def0;
    2155     border-radius: 4px;
     2235    border-radius: var(--extnify-radius-sm);
    21562236    font-size: 13px;
    21572237    line-height: 1.5;
    … …  
    22882368.ext-ph-table td {
    22892369    padding: 5px 10px;
    2290     border: 1px solid #e0e0e0;
     2370    border: 1px solid var(--extnify-border-light);
    22912371    vertical-align: top;
    22922372    background: var(--extnify-surface);
    … …  
    23042384    background: #eef2f5;
    23052385    padding: 1px 5px;
    2306     border-radius: 3px;
     2386    border-radius: 4px;
    23072387    font-size: 12px;
    23082388}
    … …  
    23212401    background: #909090;
    23222402    border-color: #909090;
    2323     border-radius: 4px;
     2403    border-radius: var(--extnify-radius-sm);
    23242404    /* Fixed metrics so both (default .button and .button-small) render identically. */
    23252405    padding: 3px 11px;
    … …  
    23562436    padding: 6px;
    23572437    background: var(--extnify-surface);
    2358     border: 1px solid #b7d3ea;
    2359     border-radius: 4px;
     2438    border: 1px solid var(--extnify-accent-border);
     2439    border-radius: var(--extnify-radius-sm);
    23602440    box-shadow: 0 6px 18px rgba(0,0,0,.14);
    23612441    column-count: 1;   /* one option per line (base uses 2 columns) */
    … …  
    24122492    background: var(--extnify-accent);
    24132493    color: var(--extnify-surface);
    2414     border-radius: 4px;
     2494    border-radius: var(--extnify-radius-sm);
    24152495    font-size: 12px;
    24162496    line-height: 1.6;
  • extnify-fee/tags/1.1.0/assets/js/admin.js

    r3751128 r3833938  
    144144    // Load a blank method form into a new pane keyed by a temporary id. The
    145145    // method is NOT persisted until the user clicks Save / Save All.
    146     function loadNewMethodPane( tempId, label ) {
     146    function loadNewMethodPane( tempId, label, seq ) {
    147147        var $loading = $( '#ext-method-loading' );
    148148        var $content = $( '#ext-method-content' );
    … …  
    164164                    // Seed the admin name with the default label so the sidebar
    165165                    // and the persisted record agree ("Untitled Method N").
    166                     $pane.find( '[name="xfeepro[display]"]' ).val( label );
     166                    $pane.find( '[name="extnify_fee[display]"]' ).val( label );
     167                    // Give the customer-facing Method Title a matching number too.
     168                    if ( seq ) {
     169                        $pane.find( '[name="extnify_fee[name]"]' ).val( 'Fee Title ' + seq );
     170                    }
    167171                } else {
    168172                    $content.append( '<div class="ext-method-pane"><p class="ext-error">' + ( i18n.loadError || 'Error loading method.' ) + '</p></div>' );
    … …  
    184188        var $item  = addMethodSidebarItem( tempId, label, true );
    185189        sidebarItemActive( $item );
    186         loadNewMethodPane( tempId, label );
     190        loadNewMethodPane( tempId, label, newMethodSeq );
    187191    });
    188192
    … …  
    250254    // real DB id. Falls back to creating an item if none is found.
    251255    function updateSidebarItem( $form, oldId, newId, display ) {
    252         var status      = $form.find( '[name="xfeepro[status]"]' ).val();
     256        var status      = $form.find( '[name="extnify_fee[status]"]' ).val();
    253257        var isActive    = status === '1';
    254258        var statusClass = isActive ? 'ext-method-active' : 'ext-method-inactive';
    … …  
    267271
    268272    // ── Live sidebar label: reflect the Admin Name as you type ─────────────────
    269     $( document ).on( 'input', '.ext-method-form [name="xfeepro[display]"]', function () {
     273    $( document ).on( 'input', '.ext-method-form [name="extnify_fee[display]"]', function () {
    270274        var val = $( this ).val();
    271275        if ( ! val.trim() ) return;   // don't blank the sidebar item
    … …  
    275279
    276280    // ── Live sidebar status: reflect the Status select as you change it ────────
    277     $( document ).on( 'change', '.ext-method-form [name="xfeepro[status]"]', function () {
     281    $( document ).on( 'change', '.ext-method-form [name="extnify_fee[status]"]', function () {
    278282        var isActive = $( this ).val() === '1';
    279283        var id    = $( this ).closest( '.ext-method-pane' ).attr( 'data-method-id' );
    … …  
    329333            .done( function ( resp ) {
    330334                if ( resp.success ) {
    331                     var enabled = $form.find( '[name="xfeepro[status]"]' ).val() === '1';
     335                    var enabled = $form.find( '[name="extnify_fee[status]"]' ).val() === '1';
    332336                    var $item   = addMethodSidebarItem( resp.data.id, resp.data.display, enabled );
    333337                    sidebarItemActive( $item );
    … …  
    401405    // ── Rate-type dependency logic ────────────────────────────────────────────
    402406
    403     $( document ).on( 'change', '[name^="xfeepro"][name$="[rate_type]"]', function () {
     407    $( document ).on( 'change', '[name^="extnify_fee"][name$="[rate_type]"]', function () {
    404408        updateRateDeps( $( this ).closest( '.ext-method-form' ) );
    405409    });
    … …  
    710714            $form.find( 'tr.ext-zone-row .ocm-checkgroup-checkbox' ).append(
    711715                '<label class="ext-cz-label">'
    712                 + '<input type="checkbox" name="xfeepro[zone][]" value="' + escAttr( val ) + '" checked /> '
     716                + '<input type="checkbox" name="extnify_fee[zone][]" value="' + escAttr( val ) + '" checked /> '
    713717                + escHtml( cLabel + ' — ' + label )
    714718                + '</label>'
    … …  
    928932    // chosen product (hidden id + name); otherwise it stays empty.
    929933    function rangeRowHtml( idx ) {
    930         var n = 'xfeepro[ranges][' + idx + ']';
     934        var n = 'extnify_fee[ranges][' + idx + ']';
    931935        // Free plugin: Start / End / Cost / Remove only (blocks, partial, per-product
    932936        // are Pro). Keep this in sync with get_ranges_html() in the controller.
    … …  
    966970        var $list = $( this ).closest( 'div' ).siblings( '.ext-sub-options-list' );
    967971        subOptIndex = $list.find( '.ext-sub-opt-row' ).length;
    968         var n   = 'xfeepro[sub_options][' + subOptIndex + ']';
     972        var n   = 'extnify_fee[sub_options][' + subOptIndex + ']';
    969973        $list.append(
    970974            '<div class="ext-sub-opt-row" data-index="' + subOptIndex + '">'
    … …  
    10791083            $list.empty();
    10801084            $.each( rows, function ( i, row ) {
    1081                 var n = 'xfeepro[sub_options][' + i + ']';
     1085                var n = 'extnify_fee[sub_options][' + i + ']';
    10821086                $list.append(
    10831087                    '<div class="ext-sub-opt-row" data-index="' + i + '">'
  • extnify-fee/tags/1.1.0/bootstrap.php

    r3751128 r3833938  
    22defined( 'ABSPATH' ) || exit;
    33
    4 class XFee_Plugin {
     4class Extnify_Fee_Plugin {
    55
    66    private static $instance = null;
    … …  
    2020    private function includes(): void {
    2121        // Model + fee engine: needed on both frontend and admin.
    22         require_once XFEE_PLUGIN_PATH . 'admin/model.php';
    23         require_once XFEE_PLUGIN_PATH . 'front/class-fee.php';
     22        require_once EXTNIFY_FEE_PLUGIN_PATH . 'admin/model.php';
     23        Extnify_Fee_Model::maybe_upgrade(); // sync DB schema (handles updates, not just activation)
     24        require_once EXTNIFY_FEE_PLUGIN_PATH . 'front/class-fee.php';
    2425
    2526        if ( is_admin() ) {
    26             require_once XFEE_PLUGIN_PATH . 'system/library/ocm/autoloader.php';
    27             require_once XFEE_PLUGIN_PATH . 'admin/controller.php';
    28             new XFee_Back( new XFee_Model() );
     27            require_once EXTNIFY_FEE_PLUGIN_PATH . 'system/extnify-core/ui/autoloader.php';
     28            require_once EXTNIFY_FEE_PLUGIN_PATH . 'system/framework/traits/woo-helpers.php';
     29            require_once EXTNIFY_FEE_PLUGIN_PATH . 'admin/controller.php';
     30            new Extnify_Fee_Back( new Extnify_Fee_Model() );
    2931        }
    3032    }
    … …  
    5052            return;
    5153        }
    52         ( new XFee_Fee() )->apply( $cart );
     54        ( new Extnify_Fee_Fee() )->apply( $cart );
    5355    }
    5456
  • extnify-fee/tags/1.1.0/extnify-fee.php

    r3772791 r3833938  
    44 * Plugin URI:        https://extnify.com/platforms/woocommerce
    55 * Description:       Conditional cart fees for WooCommerce — flat or percentage fees, gated by shipping zone, payment method or shipping method.
    6  * Version:           1.0.1
     6 * Version:           1.1.0
    77 * Author:            Extnify Labs LLC
    88 * Author URI:        https://extnify.com
    … …  
    2222defined( 'ABSPATH' ) || exit;
    2323
    24 // Build identity: FALSE = free build → no license verification, no phone-home.
    25 // Free and Pro ship under the SAME slug + main file, so they can never be active
    26 // together (installing one replaces the other in place) — this free build always
    27 // defines the flag.
    28 defined( 'EXTNIFY_DISTRIBUTION' ) || define( 'EXTNIFY_DISTRIBUTION', false );
    29 
    3024register_activation_hook( __FILE__, function() {
    3125    require_once plugin_dir_path( __FILE__ ) . 'admin/model.php';
    32     XFee_Model::create_table();
     26    Extnify_Fee_Model::maybe_upgrade();
    3327} );
    3428
    3529// Metadata single-source-of-truth (keep the PHP header above in sync — WordPress
    36 // reads that directly). Constants are uniquely prefixed (XFEE_*) so this free
     30// reads that directly). Constants are uniquely prefixed (EXTNIFY_FEE_*) so this free
    3731// plugin can never collide with the paid Extnify Fee Rules Pro (which uses EXTNIFY_*).
    3832// Closure-wrapped so $meta stays function-scoped (no global variable).
    … …  
    4034        $meta = json_decode( file_get_contents( plugin_dir_path( __FILE__ ) . 'extnify.json' ), true );
    4135
    42         define( 'XFEE_PLUGIN_VERSION',     $meta['version'] );
    43         define( 'XFEE_PLUGIN_NAME',        $meta['name'] );
    44         define( 'XFEE_PLUGIN_TEXT_DOMAIN', $meta['text_domain'] );
    45         define( 'XFEE_PLUGIN_REQUIRES_WC', $meta['requires_wc'] );
    46         define( 'XFEE_PLUGIN_TESTED_WC',   $meta['tested_wc'] );
    47         define( 'XFEE_PLUGIN_PATH',        plugin_dir_path( __FILE__ ) );
    48         define( 'XFEE_PLUGIN_URL',         plugin_dir_url( __FILE__ ) );
    49         define( 'XFEE_PLUGIN_FILE',        __FILE__ );
     36        define( 'EXTNIFY_FEE_PLUGIN_VERSION',     $meta['version'] );
     37        define( 'EXTNIFY_FEE_PLUGIN_NAME',        $meta['name'] );
     38        define( 'EXTNIFY_FEE_PLUGIN_TEXT_DOMAIN', $meta['text_domain'] );
     39        define( 'EXTNIFY_FEE_PLUGIN_REQUIRES_WC', $meta['requires_wc'] );
     40        define( 'EXTNIFY_FEE_PLUGIN_TESTED_WC',   $meta['tested_wc'] );
     41        define( 'EXTNIFY_FEE_PLUGIN_PATH',        plugin_dir_path( __FILE__ ) );
     42        define( 'EXTNIFY_FEE_PLUGIN_URL',         plugin_dir_url( __FILE__ ) );
     43        define( 'EXTNIFY_FEE_PLUGIN_FILE',        __FILE__ );
    5044
    5145        // Build-set "Upgrade to Pro" target. The WordPress.org build ships a URL (shows
    5246        // the card); the WooCommerce build ships "" (hides it, WooCommerce owns the upsell).
    53         define( 'XFEE_UPGRADE_URL', isset( $meta['upgrade_url'] ) ? (string) $meta['upgrade_url'] : '' );
     47        define( 'EXTNIFY_FEE_UPGRADE_URL', isset( $meta['upgrade_url'] ) ? (string) $meta['upgrade_url'] : '' );
    5448} )();
    5549
    … …  
    6963        add_action( 'admin_notices', function() {
    7064            echo '<div class="error"><p>'
    71                 . esc_html( XFEE_PLUGIN_NAME . ' requires WooCommerce to be installed and active.' )
     65                . esc_html( EXTNIFY_FEE_PLUGIN_NAME . ' requires WooCommerce to be installed and active.' )
    7266                . '</p></div>';
    7367        } );
    … …  
    7569    }
    7670
    77     require_once XFEE_PLUGIN_PATH . 'bootstrap.php';
    78     XFee_Plugin::instance();
     71    require_once EXTNIFY_FEE_PLUGIN_PATH . 'bootstrap.php';
     72    Extnify_Fee_Plugin::instance();
    7973
    8074} );
  • extnify-fee/tags/1.1.0/extnify.json

    r3772791 r3833938  
    22    "name": "Extnify Fee Rules",
    33    "title": "Extnify Fee Rules for WooCommerce",
    4     "version": "1.0.1",
     4    "version": "1.1.0",
    55    "description": "Conditional cart fees for WooCommerce — flat or percentage fees, gated by shipping zone, payment method or shipping method.",
    66    "author": "Extnify Labs LLC",
  • extnify-fee/tags/1.1.0/front/class-fee.php

    r3751128 r3833938  
    1717defined( 'ABSPATH' ) || exit;
    1818
    19 class XFee_Fee {
     19require_once __DIR__ . '/../system/extnify-core/traits/debug-log.php';
     20
     21class Extnify_Fee_Fee {
     22
     23    use Extnify_Debug_Log;
    2024
    2125    /** Free understands only the flat rate type. */
    … …  
    2327
    2428    /** Whether the global Debugging setting is on (computed per calculation). */
    25     private $debug = false;
     29    private $debug = null;
    2630
    2731    /**
    … …  
    3438        // When it is disabled, NO fees are applied — matching OpenCart. Absent =
    3539        // enabled (so a fresh install with configured fees works out of the box).
    36         $global = (array) get_option( 'x_feepro', array() );
     40        $global = (array) get_option( 'extnify_fee', array() );
    3741        $status = isset( $global['status'] ) ? (string) $global['status'] : '1';
    3842        if ( '1' !== $status ) {
    … …  
    4145        }
    4246
    43         $model = new XFee_Model();
     47        $model = new Extnify_Fee_Model();
    4448        $rows  = $model->getData();
    4549        if ( empty( $rows ) ) {
    … …  
    194198    // ── Debug log (gated by the global Debugging setting) ─────────────────────
    195199
    196     private function debug_enabled(): bool {
    197         $s = (array) get_option( 'x_feepro', array() );
    198         return isset( $s['debug'] ) && '1' === (string) $s['debug'];
    199     }
    200 
    201     /**
    202      * Append one entry to the debug log — only when Debugging is enabled.
    203      * Stored in the database (a capped transient), never written to a file.
    204      */
    205     private function log( string $level, string $message ): void {
    206         if ( ! $this->debug ) {
    207             return;
    208         }
    209         $entries = get_transient( 'x_feepro_debug_log' );
    210         if ( ! is_array( $entries ) ) {
    211             $entries = array();
    212         }
    213         $entries[] = array(
    214             'time'    => current_time( 'H:i:s' ),
    215             'level'   => strtolower( $level ),
    216             'message' => $message,
    217         );
    218         if ( count( $entries ) > 300 ) {
    219             $entries = array_slice( $entries, -300 );
    220         }
    221         set_transient( 'x_feepro_debug_log', $entries, WEEK_IN_SECONDS );
    222     }
     200    protected function debug_option_key(): string { return 'extnify_fee'; }
     201    protected function debug_log_key(): string    { return 'extnify_fee_debug_log'; }
    223202
    224203    /** The free subset of a method's fields. */
  • extnify-fee/tags/1.1.0/readme.txt

    r3772791 r3833938  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.0.1
     7Stable tag: 1.1.0
    88Requires Plugins: woocommerce
    99WC requires at least: 7.1.0
    … …  
    2020Create as many fees as you need, set each one as a flat amount or a percentage of the subtotal, and limit when it applies by shipping zone, payment method and shipping method. A positive amount adds a fee; a negative amount shows as a discount. Everything is managed from one simple screen, and a built-in live log shows you exactly why a fee did or didn't apply.
    2121
    22 [Read the documentation »](https://extnify.com/docs/woocommerce/extnify-fee-rules-woocommerce) | [Try the live demo »](https://wc-dev.extnify.com/?auto_login=extnify-fee)
     22[Read the documentation »](https://extnify.com/docs/woocommerce/extnify-fee-rules-woocommerce) | [Try backend »](https://extnify-fee.extnify.com/wp-admin/) | [Try frontend »](https://extnify-fee.extnify.com/shop/)
    2323
    2424**See it in action:**
    … …  
    8888= More plugins by Extnify =
    8989
    90 * **Extnify Shipping Rules** — build your own conditional WooCommerce shipping methods and rates.
    91 * **Extnify Offer Rules** — let customers pick selectable discounts or add-ons at checkout.
     90* **Extnify Discount Rules** — rule-based product discounts shown as a sale across your store. [Free](https://wordpress.org/plugins/extnify-discount/) · [Pro](https://extnify.com/products/extnify-discount-rules-pro)
     91* **Extnify Offer Rules** — selectable discounts and optional add-ons for the cart and checkout. [Free](https://wordpress.org/plugins/extnify-offer/) · [Pro](https://extnify.com/products/extnify-offer-rules-pro-for-woocommerce)
     92* **Extnify Shipping Rules** — build your own conditional WooCommerce shipping methods and rates. [Free](https://wordpress.org/plugins/extnify-shipping/) · [Pro](https://extnify.com/products/extnify-shipping-pro-woocommerce)
    9293
    9394Extnify Fee Rules is built by Extnify, the team behind the X-FeePro extension for OpenCart.
    … …  
    141142== Changelog ==
    142143
     144= 1.1.0 =
     145* Rebuilt on the shared Extnify core, consistent with the other Extnify plugins.
     146* Your existing fees and settings are moved to the new storage automatically on update — nothing to re-enter.
     147* The database table now updates itself automatically after plugin updates.
     148* New fees get a numbered default title (Fee Title 2, Fee Title 3, …).
     149* Readme: new backend and frontend demo links.
     150
    143151= 1.0.1 =
    144152* Expanded the plugin listing (features, demo, FAQ).
    … …  
    150158== Upgrade Notice ==
    151159
     160= 1.1.0 =
     161Your fees and settings are moved to the new storage automatically. As always, back up your site before updating.
     162
    152163= 1.0.1 =
    153164Refreshed the plugin listing and corrected the in-admin Documentation link.
  • extnify-fee/tags/1.1.0/system/framework/traits/woo-helpers.php

    r3751128 r3833938  
    11<?php
    22/**
    3  * XFee_Woo_Helpers — WooCommerce-specific admin helpers shared across plugins:
     3 * Extnify_Fee_Woo_Helpers — WooCommerce-specific admin helpers shared across plugins:
    44 * shipping-rate cache busting, zone (country→state) lookup, and brand
    55 * taxonomy detection. Composed into an admin controller.
    … …  
    77defined( 'ABSPATH' ) || exit;
    88
    9 trait XFee_Woo_Helpers {
     9trait Extnify_Fee_Woo_Helpers {
    1010
    1111    public function ajax_get_zones() {
    … …  
    2727                $zones[] = array(
    2828                    'value' => $code . ':' . $state_code,
    29                     'name'  => \Extnify\XFee\Ocm\Misc::decode( $country_name . ' — ' . $state_name ),
     29                    'name'  => \Extnify\Fee\Ui\Misc::decode( $country_name . ' — ' . $state_name ),
    3030                );
    3131            }
  • extnify-fee/tags/1.1.0/uninstall.php

    r3751128 r3833938  
    1212
    1313// The debug log is transient (ephemeral) data — always clear it.
    14 delete_transient( 'x_feepro_debug_log' );
     14delete_transient( 'extnify_fee_debug_log' );
    1515
    16 delete_option( 'x_feepro' );
     16delete_option( 'extnify_fee' );
     17// Drop the stored schema version so a later reinstall recreates the table.
     18delete_option( 'extnify_fee_db_version' );
    1719require_once plugin_dir_path( __FILE__ ) . 'admin/model.php';
    18 XFee_Model::drop_table();
     20Extnify_Fee_Model::drop_table();
  • extnify-fee/trunk/admin/controller.php

    r3772791 r3833938  
    11<?php
    2 use Extnify\XFee\Ocm\Form;
    3 use Extnify\XFee\Ocm\Misc;
     2use Extnify\Fee\Ui\Form;
     3use Extnify\Fee\Ui\Misc;
    44defined( 'ABSPATH' ) || exit;
    55
    … …  
    1212 *
    1313 * Shared identity with Pro (so the data table stays compatible):
    14  *   • global option / field prefix / nonce group  = `x_feepro`
    15  *   • per-method field prefix                      = `xfeepro`
     14 *   • global option / field prefix / nonce group  = `extnify_fee`
     15 *   • per-method field prefix                      = `extnify_fee`
    1616 * The admin PAGE slug is `extnify-fee` (same as Pro).
    1717 */
    18 class XFee_Back {
    19 
    20     use XFee_Woo_Helpers; // ajax_get_zones() for the Shipping Zone field
     18class Extnify_Fee_Back {
     19
     20    use Extnify_Fee_Woo_Helpers; // ajax_get_zones() for the Shipping Zone field
    2121
    2222    /** @var Form */   private $form;
    2323    /** @var Misc */   private $misc;
    24     /** @var XFee_Model */ private $model;
     24    /** @var Extnify_Fee_Model */ private $model;
    2525    /** @var array */      private $langs_data;
    2626
    27     private static function group() { return 'x_feepro'; } // shared option + field prefix + nonce
     27    private static function group() { return 'extnify_fee'; } // shared option + field prefix + nonce
    2828    private static function slug()  { return 'extnify-fee'; } // admin page slug
    2929
    30     public function __construct( XFee_Model $model ) {
     30    public function __construct( Extnify_Fee_Model $model ) {
    3131        $this->model      = $model;
    3232        $this->form       = new Form();
    … …  
    4040
    4141        // AJAX action names are prefixed with this plugin's unique group
    42         // (e.g. wp_ajax_x_feepro_load_method) so two active Extnify plugins never
     42        // (e.g. wp_ajax_extnify_fee_load_method) so two active Extnify plugins never
    4343        // register the same hook — otherwise both handlers fire on one request.
    4444        $ajax = array( 'load_method', 'save_method', 'delete_method',
    … …  
    167167
    168168    private function tab_gs_general( array $setting ) {
     169        // Default the global Sort Order to 0 when unset (new installs show 0, not blank).
     170        $setting = array_merge( array( 'sort_order' => '0' ), $setting );
    169171        $this->form->setPreset( $setting );
    170172        $html  = '<table class="form-table" role="presentation"><tbody>';
    … …  
    177179
    178180    /**
    179      * "Available in Pro Version" placeholder. On the wp.org build (XFEE_UPGRADE_URL
     181     * "Available in Pro Version" placeholder. On the wp.org build (EXTNIFY_FEE_UPGRADE_URL
    180182     * set) it links to the Pro product page; on the WooCommerce build (constant
    181183     * empty) it stays plain text — no external upsell link (Marketplace rules).
    182184     */
    183185    private function pro_placeholder( $text = null, $icon = 'dashicons-lock' ) {
    184         $url   = defined( 'XFEE_UPGRADE_URL' ) ? (string) XFEE_UPGRADE_URL : '';
     186        $url   = defined( 'EXTNIFY_FEE_UPGRADE_URL' ) ? (string) EXTNIFY_FEE_UPGRADE_URL : '';
    185187        $label = ( null === $text ) ? esc_html__( 'Available in Pro Version', 'extnify-fee' ) : esc_html( $text );
    186188        $body  = ( '' !== $url )
    … …  
    195197    /** Help & Support — support links only (the live debug log is a Pro feature). */
    196198    private function tab_gs_help() {
    197         $ver     = defined( 'XFEE_PLUGIN_VERSION' ) ? XFEE_PLUGIN_VERSION : '1.0.0';
     199        $ver     = defined( 'EXTNIFY_FEE_PLUGIN_VERSION' ) ? EXTNIFY_FEE_PLUGIN_VERSION : '1.0.0';
    198200        $wp_ver  = get_bloginfo( 'version' );
    199201        $php_ver = preg_replace( '/^(\d+\.\d+).*/', '$1', PHP_VERSION );
    … …  
    234236        // (WordPress.org build). The WooCommerce build ships an empty URL, so the
    235237        // card is dropped entirely (the marketplace owns the upsell there).
    236         if ( defined( 'XFEE_UPGRADE_URL' ) && XFEE_UPGRADE_URL ) {
    237             $html .= '<a href="' . esc_url( XFEE_UPGRADE_URL ) . '" target="_blank" rel="noopener" class="ext-hs-card ext-hs-upgrade">'
     238        if ( defined( 'EXTNIFY_FEE_UPGRADE_URL' ) && EXTNIFY_FEE_UPGRADE_URL ) {
     239            $html .= '<a href="' . esc_url( EXTNIFY_FEE_UPGRADE_URL ) . '" target="_blank" rel="noopener" class="ext-hs-card ext-hs-upgrade">'
    238240                   . '<span class="ext-hs-card-icon dashicons dashicons-star-filled"></span>'
    239241                   . '<span class="ext-hs-card-text"><strong>' . esc_html__( 'Upgrade to Pro', 'extnify-fee' ) . '</strong>'
    … …  
    328330        }
    329331
    330         $extnify = null; // the Extnify shipping method (free 'x_shipping' or pro 'x_shipping_pro').
     332        $extnify = null; // the Extnify shipping method (free 'extnify_shipping' or pro 'extnify_shipping_pro').
    331333        foreach ( WC()->shipping()->get_shipping_methods() as $method ) {
    332             if ( in_array( $method->id, array( 'x_shipping', 'x_shipping_pro' ), true ) ) {
     334            if ( in_array( $method->id, array( 'extnify_shipping', 'extnify_shipping_pro' ), true ) ) {
    333335                $extnify = $method; // expanded into rows below — don't list the collapsed type.
    334336                continue;
    … …  
    339341        if ( $extnify ) {
    340342            global $wpdb;
    341             $table = $wpdb->prefix . 'xshippingpro_methods';
     343            $table = $wpdb->prefix . 'extnify_shipping_methods';
    342344            // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- checking existence of a fixed prefixed table.
    343345            if ( $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table ) ) === $table ) {
    … …  
    376378            'shipping_all' => '1',
    377379            'tax_class_id' => '',
    378             'sort_order'   => '',
     380            'sort_order'   => '0',
    379381            'status'       => '1',
    380382            'rate_type'    => 'flat',
    … …  
    390392
    391393        $this->form
    392             ->setBasename( 'xfeepro' )
     394            ->setBasename( 'extnify_fee' )
    393395            ->setPreset( $method_data )
    394396            ->setIDPostfix( $postfix )
    … …  
    498500        $mdata   = $row ? $row['method_data'] : array();
    499501
    500         $this->form->setBasename( 'xfeepro' )->setLangs( $this->langs_data );
     502        $this->form->setBasename( 'extnify_fee' )->setLangs( $this->langs_data );
    501503        $id_postfix = $id ? (string) $id : ( $postfix ?: 'new' );
    502504        wp_send_json_success( array( 'html' => $this->get_form_data( $mdata, $id, $id_postfix ), 'id' => $id ) );
    … …  
    506508        $this->check_ajax_auth();
    507509        $id      = isset( $_POST['ext_method_id'] ) ? sanitize_text_field( wp_unslash( $_POST['ext_method_id'] ) ) : 'new'; // phpcs:ignore WordPress.Security.NonceVerification.Missing -- nonce verified in check_ajax_auth()
    508         $posted  = isset( $_POST['xfeepro'] ) ? (array) wp_unslash( $_POST['xfeepro'] ) : array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- nonce verified in check_ajax_auth(); sanitized in sanitize_method()
     510        $posted  = isset( $_POST['extnify_fee'] ) ? (array) wp_unslash( $_POST['extnify_fee'] ) : array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- nonce verified in check_ajax_auth(); sanitized in sanitize_method()
    509511        $is_new  = ( 'new' === $id || ! $id );
    510512        $mdata   = $this->sanitize_method( $posted, $is_new ? 0 : (int) $id );
    … …  
    542544        $this->check_ajax_auth();
    543545        $limit   = isset( $_REQUEST['limit'] ) ? max( 1, min( 500, (int) $_REQUEST['limit'] ) ) : 60; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- nonce verified in check_ajax_auth(); value is int-clamped
    544         $log     = get_transient( 'x_feepro_debug_log' );
     546        $log     = get_transient( 'extnify_fee_debug_log' );
    545547        $entries = array();
    546548        if ( is_array( $log ) ) {
    … …  
    559561    public function ajax_debug_clear() {
    560562        $this->check_ajax_auth();
    561         delete_transient( 'x_feepro_debug_log' );
     563        delete_transient( 'extnify_fee_debug_log' );
    562564        wp_send_json_success();
    563565    }
    … …  
    606608            return;
    607609        }
    608         $theme_path = XFEE_PLUGIN_PATH . 'assets/css/theme.css';
    609         $css_path   = XFEE_PLUGIN_PATH . 'assets/css/admin.css';
    610         $js_path    = XFEE_PLUGIN_PATH . 'assets/js/admin.js';
     610        $theme_path = EXTNIFY_FEE_PLUGIN_PATH . 'assets/css/theme.css';
     611        $css_path   = EXTNIFY_FEE_PLUGIN_PATH . 'assets/css/admin.css';
     612        $js_path    = EXTNIFY_FEE_PLUGIN_PATH . 'assets/js/admin.js';
    611613        // Shared Extnify theme (brand tokens + components) loads first…
    612         wp_enqueue_style(  'extnify-theme', XFEE_PLUGIN_URL . 'assets/css/theme.css', array(), file_exists( $theme_path ) ? filemtime( $theme_path ) : XFEE_PLUGIN_VERSION );
     614        wp_enqueue_style(  'extnify-theme', EXTNIFY_FEE_PLUGIN_URL . 'assets/css/theme.css', array(), file_exists( $theme_path ) ? filemtime( $theme_path ) : EXTNIFY_FEE_PLUGIN_VERSION );
    613615        // …then this plugin's own overrides, so they win via the cascade.
    614         wp_enqueue_style(  'extnify-fee-admin', XFEE_PLUGIN_URL . 'assets/css/admin.css', array( 'extnify-theme' ), file_exists( $css_path ) ? filemtime( $css_path ) : XFEE_PLUGIN_VERSION );
    615         wp_enqueue_script( 'extnify-fee-admin', XFEE_PLUGIN_URL . 'assets/js/admin.js', array( 'jquery', 'jquery-ui-sortable' ), file_exists( $js_path ) ? filemtime( $js_path ) : XFEE_PLUGIN_VERSION, true );
     616        wp_enqueue_style(  'extnify-fee-admin', EXTNIFY_FEE_PLUGIN_URL . 'assets/css/admin.css', array( 'extnify-theme' ), file_exists( $css_path ) ? filemtime( $css_path ) : EXTNIFY_FEE_PLUGIN_VERSION );
     617        wp_enqueue_script( 'extnify-fee-admin', EXTNIFY_FEE_PLUGIN_URL . 'assets/js/admin.js', array( 'jquery', 'jquery-ui-sortable' ), file_exists( $js_path ) ? filemtime( $js_path ) : EXTNIFY_FEE_PLUGIN_VERSION, true );
    616618        wp_localize_script( 'extnify-fee-admin', 'extnifyFeeAdmin', array(
    617619            'ajaxUrl'     => admin_url( 'admin-ajax.php' ),
    … …  
    634636        // basename() strips any path components, so $template can only resolve to a
    635637        // file inside admin/views/ — no directory traversal via the include below.
    636         $file = XFEE_PLUGIN_PATH . 'admin/views/' . basename( (string) $template ) . '.php';
     638        $file = EXTNIFY_FEE_PLUGIN_PATH . 'admin/views/' . basename( (string) $template ) . '.php';
    637639        if ( ! file_exists( $file ) ) {
    638640            return;
  • extnify-fee/trunk/admin/model.php

    r3751128 r3833938  
    44 *
    55 * IMPORTANT: this reads/writes the SAME table as the paid Extnify Fee Rules Pro
    6  * (`{prefix}xfeepro_methods`) so a customer can move between free and paid
     6 * (`{prefix}extnify_fee_methods`) so a customer can move between free and paid
    77 * without losing their configured methods. Pro writes a superset of fields into
    88 * the `method_data` JSON; the free plugin simply reads the subset it understands
    … …  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 class XFee_Model {
     13class Extnify_Fee_Model {
    1414
    1515    private $table;
    … …  
    1717    public function __construct() {
    1818        global $wpdb;
    19         $this->table = $wpdb->prefix . 'xfeepro_methods';
     19        $this->table = $wpdb->prefix . 'extnify_fee_methods';
    2020    }
    2121
    2222    // ── Schema (shared table — CREATE IF NOT EXISTS, so either plugin may make it) ─
    2323
     24    /** DB schema version -- bump when the table schema below changes. */
     25    const DB_VERSION        = '1.0.0';
     26    /** Per-plugin option storing the installed schema version. */
     27    const DB_VERSION_OPTION = 'extnify_fee_db_version';
     28
     29    /**
     30     * Idempotent schema sync. Runs on activation AND on every request (cheap option
     31     * check); when the stored version is behind the code it re-runs dbDelta, so a
     32     * plugin UPDATE that adds a column actually alters the live table (the activation
     33     * hook does not fire on updates). dbDelta only adds/modifies columns, never drops.
     34     */
     35    public static function maybe_upgrade() {
     36        global $wpdb;
     37        if ( get_option( self::DB_VERSION_OPTION ) === self::DB_VERSION ) {
     38            // Version says current — but verify the table actually EXISTS before trusting
     39            // it. An uninstall/DB-reset can drop the table yet leave this option behind,
     40            // which would otherwise block re-creation. Self-heal if it's gone.
     41            $table = ( new self() )->table;
     42            if ( $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table ) ) === $table ) {
     43                return;
     44            }
     45        }
     46        self::create_table();
     47        update_option( self::DB_VERSION_OPTION, self::DB_VERSION );
     48    }
     49
    2450    public static function create_table() {
    2551        global $wpdb;
    26         $table           = $wpdb->prefix . 'xfeepro_methods';
     52        $table           = $wpdb->prefix . 'extnify_fee_methods';
    2753        $charset_collate = $wpdb->get_charset_collate();
    2854        $sql = "CREATE TABLE IF NOT EXISTS {$table} (
    … …  
    3965    public static function drop_table() {
    4066        global $wpdb;
    41         $table = $wpdb->prefix . 'xfeepro_methods';
     67        $table = $wpdb->prefix . 'extnify_fee_methods';
    4268        // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, PluginCheck.Security.DirectDB.UnescapedDBParameter -- table name is $wpdb->prefix + a fixed string; identifiers can't be bound via prepare().
    4369        $wpdb->query( "DROP TABLE IF EXISTS {$table}" );
  • extnify-fee/trunk/assets/css/admin.css

    r3751128 r3833938  
    33
    44   The shared look (brand tokens + all components) lives in the Extnify theme:
    5    assets/css/theme.css, injected at build from shared-resources-wp/common/theme/.
     5   assets/css/theme.css, injected at build from shared-resources/theme/.
    66   It loads FIRST; this file loads after it, so anything here overrides the theme.
    77
  • extnify-fee/trunk/assets/css/theme.css

    r3751128 r3833938  
    88   -------------------------------------------------------------------------- */
    99:root {
    10     /* Accent - WooCommerce purple */
    11     --extnify-accent:        #7f54b3;
    12     --extnify-accent-dark:   #6d3f9e;
    13     --extnify-accent-darker: #5a3a8a;
    14     --extnify-accent-tint:   #f5f0fb;
    15     --extnify-accent-tint-2: #efe9fa;
    16     --extnify-accent-border: #c4aee3;
     10    /* Accent - Extnify blue */
     11    --extnify-accent:        #3863e9;
     12    --extnify-accent-dark:   #2a4ed2;   /* hover   */
     13    --extnify-accent-darker: #1f3eb0;   /* pressed */
     14    --extnify-accent-tint:   #eef2fd;   /* selected background */
     15    --extnify-accent-tint-2: #e1e7fc;   /* hover background */
     16    --extnify-accent-border: #b4c4f7;
     17    --extnify-accent-ring:   rgba(56, 99, 233, .2);   /* focus ring */
    1718
    1819    /* Text (WordPress admin neutrals) */
    … …  
    2627    --extnify-bg:            #f6f7f7;
    2728    --extnify-bg-soft:       #f0f0f1;
    28     --extnify-border:        #c3c4c7;
    29     --extnify-border-light:  #e2e2e4;
     29    --extnify-border:        #dcdcde;
     30    --extnify-border-light:  #e2e4e7;
     31    --extnify-border-input:  #8c8f94;
    3032
    3133    /* Semantic */
    32     --extnify-link:          #2271b1;
     34    --extnify-link:          #3863e9;
    3335    --extnify-danger:        #d63638;
    34     --extnify-success:       #4b8a5c;
     36    --extnify-danger-tint:   #fcf0f1;
     37    --extnify-success:       #007a3d;
     38    --extnify-success-tint:  #e6f4ea;
     39    --extnify-warning:       #996800;
     40
     41    /* Shape */
     42    --extnify-radius-sm:     6px;   /* inputs, buttons, list items */
     43    --extnify-radius:        8px;   /* small cards */
     44    --extnify-radius-lg:     12px;  /* page-level cards */
     45    --extnify-shadow:        0 1px 2px rgba(0, 0, 0, .04);
    3546
    3647    /* Typography */
    … …  
    4354.ext-wrap {
    4455    max-width: 100%;
     56}
     57
     58/* --------------------------------------------------------------------------
     59   Buttons — one system for every Extnify screen.
     60   WordPress 7 gives core .button a 40px min-height, 38px line-height and
     61   2px corners, and any padding we add stacks on top of that (52px-tall
     62   square buttons). Reset it once here: 36px, 6px corners, centred content.
     63   `.ext-wrap .button` (0,2,0) beats `.wp-core-ui .button` by load order.
     64     .button                → secondary (white, grey border)
     65     .button.button-primary → primary (accent)
     66     .button.button-small   → compact (30px)
     67   -------------------------------------------------------------------------- */
     68.ext-wrap .button {
     69    display: inline-flex;
     70    align-items: center;
     71    justify-content: center;
     72    gap: 6px;
     73    min-height: 36px;
     74    height: auto;
     75    padding: 0 14px;
     76    line-height: 1.2;
     77    font-size: 13px;
     78    font-weight: 600;
     79    color: var(--extnify-text-soft);
     80    background: var(--extnify-surface);
     81    border: 1px solid var(--extnify-border);
     82    border-radius: var(--extnify-radius-sm);
     83    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
     84    text-decoration: none;
     85    vertical-align: middle;
     86    cursor: pointer;
     87    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
     88}
     89
     90.ext-wrap .button:hover {
     91    color: var(--extnify-accent-dark);
     92    background: var(--extnify-accent-tint);
     93    border-color: var(--extnify-accent-border);
     94}
     95
     96.ext-wrap .button:active {
     97    background: var(--extnify-accent-tint-2);
     98    box-shadow: none;
     99}
     100
     101.ext-wrap .button:focus {
     102    outline: none;
     103    color: var(--extnify-accent-dark);
     104    border-color: var(--extnify-accent);
     105    box-shadow: 0 0 0 3px var(--extnify-accent-ring);
     106}
     107
     108.ext-wrap .button.button-primary {
     109    color: #fff;
     110    background: var(--extnify-accent);
     111    border-color: var(--extnify-accent);
     112    box-shadow: 0 1px 2px color-mix(in srgb, var(--extnify-accent) 35%, transparent);
     113}
     114
     115.ext-wrap .button.button-primary:hover {
     116    color: #fff;
     117    background: var(--extnify-accent-dark);
     118    border-color: var(--extnify-accent-dark);
     119}
     120
     121.ext-wrap .button.button-primary:active {
     122    background: var(--extnify-accent-darker);
     123    border-color: var(--extnify-accent-darker);
     124    box-shadow: none;
     125}
     126
     127.ext-wrap .button.button-primary:focus {
     128    color: #fff;
     129    border-color: var(--extnify-accent);
     130    box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--extnify-accent);
     131}
     132
     133.ext-wrap .button.button-small {
     134    min-height: 30px;
     135    padding: 0 10px;
     136    font-size: 12px;
     137}
     138
     139.ext-wrap .button:disabled,
     140.ext-wrap .button[disabled],
     141.ext-wrap .button.disabled {
     142    opacity: .55;
     143    cursor: not-allowed;
     144    box-shadow: none;
     145}
     146
     147.ext-wrap .button .dashicons {
     148    font-size: 16px;
     149    width: 16px;
     150    height: 16px;
     151    line-height: 1;
     152    margin: 0;
     153    flex-shrink: 0;
    45154}
    46155
    … …  
    99208    min-height: 600px;
    100209    background: var(--extnify-surface);
    101     border: 1px solid var(--extnify-border);
    102     border-radius: 4px;
     210    border: 1px solid var(--extnify-border-light);
     211    border-radius: var(--extnify-radius-lg);
     212    box-shadow: var(--extnify-shadow);
    103213    overflow: hidden;
    104214}
    … …  
    111221    flex-shrink: 0;
    112222    /* background: #fafafa; */
    113     border-right: 1px solid #e0e0e2;
     223    border-right: 1px solid var(--extnify-border-light);
    114224    min-height: 600px;
    115225    display: flex;
    … …  
    118228
    119229.ext-sidebar-section {
    120     border-bottom: 1px solid #e0e0e2;
     230    border-bottom: 1px solid var(--extnify-border-light);
    121231}
    122232
    … …  
    176286    flex-direction: column;
    177287    gap: 5px;
    178     background: #fafafa
     288    background: var(--extnify-bg)
    179289}
    180290
    … …  
    187297    cursor: pointer;
    188298    font-size: 12.5px;
    189     color: #2c2c2c;
     299    color: var(--extnify-text);
    190300    background: var(--extnify-surface);
    191301    border: 1px solid var(--extnify-border-light);
    192     border-radius: 6px;
    193     border-left: 3px solid #d0c8e0;
     302    border-radius: var(--extnify-radius);
    194303    transition: border-color .15s, box-shadow .15s, background .15s;
    195304    position: relative;
    … …  
    197306
    198307.ext-method-item:hover {
    199     border-color: #b49fd4;
    200     border-left-color: var(--extnify-accent);
    201     box-shadow: 0 1px 4px rgba(127,84,179,.1);
    202     background: #faf8fd;
     308    border-color: var(--extnify-accent-border);
     309    background: var(--extnify-accent-tint);
    203310}
    204311
    … …  
    210317.ext-method-item.ui-sortable-helper {
    211318    cursor: grabbing;
    212     box-shadow: 0 4px 12px rgba(127,84,179,.25);
     319    box-shadow: 0 4px 12px color-mix(in srgb, var(--extnify-accent) 25%, transparent);
    213320}
    214321
    215322.ext-sort-placeholder {
    216     border: 1px dashed #b49fd4 !important;
     323    border: 1px dashed var(--extnify-accent-border) !important;
    217324    background: var(--extnify-accent-tint) !important;
     325    border-radius: var(--extnify-radius);
    218326    visibility: visible !important;
    219327}
    … …  
    222330    background: var(--extnify-accent-tint);
    223331    border-color: var(--extnify-accent);
    224     border-left-color: var(--extnify-accent);
    225     border-left-width: 4px;
    226     box-shadow: 0 2px 6px rgba(127,84,179,.15);
    227     color: var(--extnify-accent-darker);
     332    box-shadow: 0 0 0 3px var(--extnify-accent-ring);
     333    color: var(--extnify-accent);
    228334    font-weight: 600;
    229335}
    230336
    231337.ext-method-item.ext-nav-active .ext-method-label {
    232     color: var(--extnify-accent-darker);
     338    color: var(--extnify-accent);
    233339}
    234340
    … …  
    255361
    256362.ext-method-active .ext-method-status-dot {
    257     background: #eafbea;
    258     color: #2a7a2e;
    259     border: 1px solid #b3e6b5;
     363    background: var(--extnify-success-tint);
     364    color: var(--extnify-success);
     365    border: 1px solid transparent;
    260366    content: 'On';
    261367}
    262368
    263369.ext-method-inactive .ext-method-status-dot {
    264     background: #fdf0f0;
    265     color: #a02020;
    266     border: 1px solid #f5c6c6;
     370    background: var(--extnify-danger-tint);
     371    color: var(--extnify-danger);
     372    border: 1px solid transparent;
    267373}
    268374
    … …  
    283389.ext-add-method-wrap {
    284390    padding: 12px 14px;
    285     border-top: 1px solid #e0e0e2;
     391    border-top: 1px solid var(--extnify-border-light);
    286392    margin-top: auto;
    287     background: #fafafa;
     393    background: var(--extnify-bg);
    288394}
    289395
    290396.ext-add-method-wrap .button {
    291397    width: 100%;
    292     justify-content: center;
    293     display: flex;
    294     align-items: center;
    295     gap: 6px;
     398    min-height: 40px;
     399    color: #fff;
    296400    background: var(--extnify-accent);
    297401    border-color: var(--extnify-accent);
    298     color: var(--extnify-surface);
    299     font-weight: 600;
    300     font-size: 13px;
    301     padding: 7px 0;
    302     height: auto;
    303     border-radius: 4px;
    304     box-shadow: none;
    305     transition: background .15s, border-color .15s;
     402    box-shadow: 0 1px 2px color-mix(in srgb, var(--extnify-accent) 35%, transparent);
    306403}
    307404
    … …  
    310407    background: var(--extnify-accent-dark);
    311408    border-color: var(--extnify-accent-dark);
    312     color: var(--extnify-surface);
    313     box-shadow: none;
     409    color: #fff;
    314410}
    315411
    316412.ext-add-method-wrap .button .dashicons {
    317     font-size: 15px;
    318     width: 15px;
    319     height: 15px;
    320     line-height: 1;
    321     margin-top: 1px;
    322     flex-shrink: 0;
     413    font-size: 16px;
     414    width: 16px;
     415    height: 16px;
    323416}
    324417
    … …  
    348441    align-items: flex-end;
    349442    justify-content: space-between;
    350     border-bottom: 2px solid var(--extnify-border-light);
     443    border-bottom: 1px solid var(--extnify-border);
    351444    margin-bottom: 20px;
    352445    gap: 12px;
    … …  
    362455
    363456.ext-global-save-wrap .button {
    364     display: inline-flex;
    365     align-items: center;
    366     font-size: 13px;
    367     font-weight: 600;
    368     padding: 5px 16px;
    369     height: auto;
    370     line-height: 1.6;
    371     box-shadow: none;
    372     transition: background .15s, border-color .15s;
     457    /* Sizing comes from the shared button system above. */
     458    flex-shrink: 0;
    373459}
    374460
    … …  
    377463    width: 16px;
    378464    height: 16px;
    379     line-height: 1;
    380     display: flex;
    381     align-items: center;
    382     justify-content: center;
    383465}
    384466
    385467.ext-global-save-wrap .button-primary {
    386468    background: var(--extnify-accent);
    387     border-color: var(--extnify-accent-dark);
     469    border-color: var(--extnify-accent);
    388470}
    389471
    … …  
    391473.ext-global-save-wrap .button-primary:focus {
    392474    background: var(--extnify-accent-dark);
    393     border-color: #5c3185;
     475    border-color: var(--extnify-accent-darker);
    394476    box-shadow: none;
    395477}
    … …  
    414496    background: transparent;
    415497    border: none;
    416     border-bottom: 3px solid transparent;
     498    border-bottom: 2px solid transparent;
    417499    border-radius: 0;
    418500    padding: 8px 14px;
    419     margin-bottom: -2px;
     501    margin-bottom: -1px;
    420502    text-decoration: none;
    421503    transition: color .15s, border-color .15s;
    … …  
    434516.ext-subtab-nav .nav-tab-active:hover {
    435517    color: var(--extnify-accent);
    436     font-weight: 700;
     518    font-weight: 600;
    437519    background: transparent;
    438     border-bottom: 3px solid var(--extnify-accent);
     520    border-bottom: 2px solid var(--extnify-accent);
    439521    box-shadow: none;
    440522}
    … …  
    474556}
    475557
    476 /* Icon-only action buttons (label shown via the native title tooltip) */
    477 .ext-icon-btn {
    478     display: inline-flex !important;
    479     align-items: center;
    480     justify-content: center;
    481     width: 32px;
    482     height: 30px;
    483     min-height: 30px;
    484     padding: 0 !important;
     558/* Icon-only action buttons (label shown via the native title tooltip).
     559   Save = primary; Copy / Clear cache = secondary; Delete = secondary with a
     560   red icon. One accent, never a row of differently colored blocks. */
     561.ext-wrap .ext-icon-btn {
     562    width: 36px;
     563    min-width: 36px;
     564    min-height: 36px;
     565    height: 36px;
     566    padding: 0;
    485567    font-size: 0;                /* collapse the helper's trailing &nbsp; */
    486     border: none !important;
    487     border-radius: 4px;
    488     color: var(--extnify-surface) !important;
    489     transition: filter .12s ease, transform .06s ease;
    490 }
    491 
    492 .ext-icon-btn:hover  { filter: brightness(1.08); }
    493 .ext-icon-btn:active { transform: translateY(1px); }
    494 
    495 .ext-icon-btn .dashicons {
     568}
     569
     570.ext-wrap .ext-icon-btn .dashicons {
    496571    font-size: 18px;
    497     width: 17px;
    498     height: 17px;
    499     line-height: 1;
    500     margin-bottom: 15px;
    501     color: var(--extnify-surface);
    502 }
    503 
    504 /* Solid colored actions (OpenCart-style) */
    505 .ext-method-save    { background: #2ea043 !important; }   /* green  */
    506 .ext-method-copy    { background: #f0ad4e !important; }   /* orange */
    507 .ext-method-delete  { background: #e5484d !important; }   /* red    */
    508 .ext-toolbar-save   { background: var(--extnify-accent) !important; }   /* purple */
    509 .ext-clear-cache    { background: #2f6fed !important; }   /* blue   */
     572    width: 18px;
     573    height: 18px;
     574}
     575
     576.ext-wrap .ext-method-save,
     577.ext-wrap .ext-toolbar-save {
     578    color: #fff;
     579    background: var(--extnify-accent);
     580    border-color: var(--extnify-accent);
     581    box-shadow: 0 1px 2px color-mix(in srgb, var(--extnify-accent) 35%, transparent);
     582}
     583
     584.ext-wrap .ext-method-save:hover,
     585.ext-wrap .ext-toolbar-save:hover,
     586.ext-wrap .ext-method-save:focus,
     587.ext-wrap .ext-toolbar-save:focus {
     588    color: #fff;
     589    background: var(--extnify-accent-dark);
     590    border-color: var(--extnify-accent-dark);
     591}
     592
     593.ext-wrap .ext-method-delete {
     594    color: var(--extnify-danger);
     595}
     596
     597.ext-wrap .ext-method-delete:hover,
     598.ext-wrap .ext-method-delete:focus {
     599    color: var(--extnify-danger);
     600    background: var(--extnify-danger-tint);
     601    border-color: var(--extnify-danger);
     602}
     603
     604.ext-wrap .ext-method-delete:focus {
     605    box-shadow: 0 0 0 3px color-mix(in srgb, var(--extnify-danger) 20%, transparent);
     606}
    510607
    511608.ext-method-id-badge {
    … …  
    513610    background: var(--extnify-bg-soft);
    514611    padding: 2px 8px;
    515     border-radius: 3px;
     612    border-radius: 4px;
    516613    font-family: monospace;
    517614    font-size: 13px;
    … …  
    525622    margin-bottom: 20px;
    526623    padding-bottom: 0;
    527     border-bottom: 2px solid var(--extnify-border-light);
     624    border-bottom: 1px solid var(--extnify-border);
    528625}
    529626
    … …  
    534631    background: transparent;
    535632    border: none;
    536     border-bottom: 3px solid transparent;
     633    border-bottom: 2px solid transparent;
    537634    border-radius: 0;
    538635    padding: 8px 14px;
    539     margin-bottom: -2px;
     636    margin-bottom: -1px;
    540637    text-decoration: none;
    541638    transition: color .15s, border-color .15s;
    … …  
    554651.ext-mtab-nav .nav-tab-active:hover {
    555652    color: var(--extnify-accent);
    556     font-weight: 700;
     653    font-weight: 600;
    557654    background: transparent;
    558     border-bottom: 3px solid var(--extnify-accent);
     655    border-bottom: 2px solid var(--extnify-accent);
    559656    box-shadow: none;
    560657}
    … …  
    600697    padding: 6px 10px;
    601698    height: auto;
    602     border-radius: 4px;
     699    border-radius: var(--extnify-radius-sm);
    603700    border: 1px solid var(--extnify-border);
    604701    box-shadow: none;
    … …  
    621718    padding: 0px 8px;
    622719    height: auto;
    623     border-radius: 4px;
     720    border-radius: var(--extnify-radius-sm);
    624721    border: 1px solid var(--extnify-border);
    625722    min-width: 175px;
    … …  
    638735    font-size: 13px;
    639736    padding: 6px 10px;
    640     border-radius: 4px;
     737    border-radius: var(--extnify-radius-sm);
    641738    border: 1px solid var(--extnify-border);
    642739    width: 100%;
    … …  
    689786/* Alternating row tint */
    690787.ext-wrap .form-table tr:nth-child(even) {
    691     background: #fafafa;
     788    background: var(--extnify-bg);
    692789}
    693790
    … …  
    743840    font-size: 13px;
    744841    border-color: var(--extnify-accent-border);
    745     border-radius: 4px;
     842    border-radius: var(--extnify-radius-sm);
    746843}
    747844
    … …  
    756853    max-height: 180px;
    757854    overflow-y: auto;
    758     border: 1px solid #e0d8ef;
    759     border-radius: 4px;
     855    border: 1px solid var(--extnify-border-light);
     856    border-radius: var(--extnify-radius-sm);
    760857    padding: 8px 10px;
    761858    background: var(--extnify-surface);
    … …  
    805902    height: 36px;
    806903    border-color: var(--extnify-accent-border);
    807     border-radius: 4px;
     904    border-radius: var(--extnify-radius-sm);
    808905    flex-shrink: 0;
    809906}
    … …  
    821918    min-width: 250px;
    822919    border: 1px solid var(--extnify-accent-border);
    823     border-radius: 4px;
     920    border-radius: var(--extnify-radius-sm);
    824921    background: var(--extnify-surface);
    825922    padding: 5px 8px;
    … …  
    865962    background: var(--extnify-surface);
    866963    border: 1px solid var(--extnify-border);
    867     border-radius: 3px;
     964    border-radius: 4px;
    868965    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    869966    max-height: 180px;
    … …  
    9101007    text-decoration: none;
    9111008    padding: 4px 12px;
    912     border-radius: 4px;
    913     background: #e0e0e0;
     1009    border-radius: var(--extnify-radius-sm);
     1010    background: var(--extnify-border-light);
    9141011    transition: background-color .15s ease, color .15s ease;
    9151012}
    … …  
    9621059    color: var(--extnify-surface);
    9631060    padding: 2px 6px;
    964     border-radius: 3px;
     1061    border-radius: 4px;
    9651062    font-size: 12px;
    9661063}
    … …  
    9831080    background: var(--extnify-surface);
    9841081    border: 1px solid var(--extnify-border);
    985     border-radius: 3px;
     1082    border-radius: 4px;
    9861083    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    9871084    min-width: 240px;
    … …  
    10701167.ext-range-container td {
    10711168    padding: 4px 6px;
    1072     border: 1px solid #e0e0e0;
     1169    border: 1px solid var(--extnify-border-light);
    10731170    vertical-align: middle;
    10741171}
    … …  
    11071204    padding: 4px 8px;
    11081205    border: 1px solid #dcdcde;
    1109     border-radius: 3px;
     1206    border-radius: 4px;
    11101207}
    11111208
    … …  
    11911288    letter-spacing: 0.06em;
    11921289    padding: 8px 12px;
    1193     border: 1px solid #e0d8ef;
     1290    border: 1px solid var(--extnify-border-light);
    11941291    text-align: left;
    11951292    white-space: nowrap;
    … …  
    12011298.ext-group-table td {
    12021299    padding: 6px 10px;
    1203     border: 1px solid #ebebed;
     1300    border: 1px solid var(--extnify-border-light);
    12041301    vertical-align: middle;
    12051302    background: var(--extnify-surface);
    … …  
    12071304
    12081305.ext-group-table tbody tr:nth-child(even) td {
    1209     background: #faf8fd;
     1306    background: var(--extnify-accent-tint);
    12101307}
    12111308
    … …  
    12251322    padding: 4px 6px;
    12261323    height: auto;
    1227     border-radius: 3px;
     1324    border-radius: 4px;
    12281325    border: 1px solid var(--extnify-border);
    12291326    box-shadow: none;
    … …  
    12441341    padding: 4px 8px;
    12451342    height: auto;
    1246     border-radius: 3px;
     1343    border-radius: 4px;
    12471344    border: 1px solid var(--extnify-border);
    12481345    width: 100%;
    … …  
    12661363    gap: 10px;
    12671364    background: var(--extnify-accent-tint);
    1268     border: 1px solid #d4c4ef;
     1365    border: 1px solid var(--extnify-accent-border);
    12691366    border-left: 4px solid var(--extnify-accent);
    1270     border-radius: 4px;
     1367    border-radius: var(--extnify-radius-sm);
    12711368    padding: 12px 14px;
    12721369    margin-bottom: 16px;
    … …  
    12861383    margin: 0 0 4px;
    12871384    line-height: 1.5;
    1288     color: #3d2664;
     1385    color: var(--extnify-text-soft);
    12891386}
    12901387
    … …  
    13181415
    13191416.ext-callout-body code {
    1320     background: rgba(127,84,179,.12);
     1417    background: color-mix(in srgb, var(--extnify-accent) 12%, transparent);
    13211418    color: var(--extnify-accent-darker);
    13221419    padding: 1px 5px;
    1323     border-radius: 3px;
     1420    border-radius: 4px;
    13241421    font-size: 12px;
    13251422    font-family: monospace;
    … …  
    13341431.ext-hs {
    13351432    display: grid;
    1336     grid-template-columns: minmax(320px, 430px) minmax(0, 480px);
    1337     justify-content: space-between;
     1433    /* Help column on the left; the log lives in a flexible track (1fr) that can never
     1434       overflow the container — so the panel stays on the right AND is always fully
     1435       visible, however wide the admin screen is (no more clipping at the edge). */
     1436    grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
    13381437    gap: 22px;
    13391438    align-items: stretch;
    1340     padding: 8px 2px 24px;
     1439    padding: 8px 8px 24px;
    13411440}
    13421441.ext-hs[data-log-open="0"] { grid-template-columns: minmax(320px, 430px); }
    … …  
    14101509.ext-hs-update  .ext-hs-card-icon { background: #e7f6ec; color: #38a355; }
    14111510.ext-hs-ext     .ext-hs-card-icon { background: #fdf1dc; color: #e0921a; }
     1511.ext-hs-upgrade .ext-hs-card-icon { background: var(--extnify-accent); color: #fff; }
    14121512
    14131513.ext-hs-card-text { display: flex; flex-direction: column; flex: 1; line-height: 1.35; }
    … …  
    14271527    border-radius: 16px; box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
    14281528    overflow: hidden;
    1429     /* Fixed height so the panel is the same size on every filter (All/Info/Warn/
    1430        Error/Debug) — the body just scrolls within it. Sized to the viewport so
    1431        header + body + footer stay on-screen (no page scroll). */
    14321529    min-height: 0;
     1530    /* Fallback height before JS runs. The real sizing is done by hsSizeLog() in
     1531       admin.js, which measures the panel's ACTUAL top offset and sets the height so
     1532       the whole panel (incl. footer) fits the viewport, whatever sits above it. */
    14331533    height: calc(100vh - 280px);
    14341534    align-self: start;
     1535    /* Sit at the right of the flexible track, at a sensible reading width. The track
     1536       bounds it, so it can't be clipped; margin-left:auto pins it to the right. */
     1537    width: 100%;
     1538    max-width: 520px;
     1539    margin-left: auto;
    14351540}
    14361541.ext-hs-log-head {
    14371542    display: flex; align-items: center; gap: 12px;
    1438     padding: 15px 18px; border-bottom: 1px solid #f0f0f4;
     1543    padding: 15px 18px; border-bottom: 1px solid var(--extnify-bg-soft);
    14391544    background: var(--extnify-accent-dark);
    14401545}
    … …  
    14621567.ext-hs-log-tools {
    14631568    display: flex; align-items: center; gap: 12px;
    1464     padding: 11px 16px; border-bottom: 1px solid #f4f4f7;
     1569    padding: 11px 16px; border-bottom: 1px solid var(--extnify-bg-soft);
    14651570}
    14661571.ext-hs-filters { display: flex; gap: 3px; flex: 1; flex-wrap: wrap; }
    … …  
    14691574    font-size: 13px; color: #6b6f76; padding: 5px 12px; border-radius: 20px;
    14701575}
    1471 .ext-hs-filter:hover { background: #f4f4f7; }
     1576.ext-hs-filter:hover { background: var(--extnify-bg-soft); }
    14721577.ext-hs-filter.active { background: var(--extnify-text); color: var(--extnify-surface); }
    14731578.ext-hs-tools-right { display: flex; align-items: center; gap: 12px; }
    … …  
    15351640
    15361641.ext-hs-lvl-info  .ext-hs-bubble { background: #f3f8fd; border-color: #dcebf8; }
    1537 .ext-hs-lvl-debug .ext-hs-bubble { background: #f7f4fc; border-color: #e6dcf4; }
     1642.ext-hs-lvl-debug .ext-hs-bubble { background: var(--extnify-accent-tint); border-color: var(--extnify-accent-tint-2); }
    15381643.ext-hs-lvl-warn  .ext-hs-bubble { background: #fdf8ec; border-color: #f2e4c3; }
    15391644.ext-hs-lvl-error .ext-hs-bubble { background: #fdf1f1; border-color: #f4d4d4; }
    … …  
    15421647.ext-hs-log-foot {
    15431648    display: flex; align-items: center; justify-content: space-between;
    1544     padding: 12px 16px; border-top: 1px solid #f0f0f4;
     1649    padding: 12px 16px; border-top: 1px solid var(--extnify-bg-soft);
    15451650}
    15461651.ext-hs-conn { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #82868b; }
    1547 .ext-hs .ext-hs-history.button {
     1652.ext-wrap .ext-hs .ext-hs-history.button {
    15481653    background: var(--extnify-text); border-color: var(--extnify-text); color: var(--extnify-surface);
    1549     border-radius: 8px; box-shadow: none;
    1550     display: inline-flex; align-items: center; gap: 5px; padding: 5px 13px; height: auto;
    1551 }
    1552 .ext-hs .ext-hs-history.button:hover { background: #000; border-color: #000; }
    1553 .ext-hs .ext-hs-history .dashicons { font-size: 15px; width: 15px; height: 27px; }
     1654}
     1655.ext-wrap .ext-hs .ext-hs-history.button:hover,
     1656.ext-wrap .ext-hs .ext-hs-history.button:focus { background: #000; border-color: #000; color: var(--extnify-surface); }
    15541657
    15551658@media (max-width: 1100px) {
    15561659    .ext-hs, .ext-hs[data-log-open="1"] { grid-template-columns: 1fr; }
     1660    /* Stacked: full-width instead of a right-pinned 520px panel. */
     1661    .ext-hs-log { max-width: none; margin-left: 0; }
    15571662}
    15581663
    … …  
    15641669    background: var(--extnify-surface);
    15651670    border: 1px solid var(--extnify-border);
    1566     border-radius: 4px;
     1671    border-radius: var(--extnify-radius-sm);
    15671672}
    15681673
    … …  
    16051710    gap: 12px;
    16061711    background: var(--extnify-surface);
    1607     border: 1px solid #e0d8ef;
     1712    border: 1px solid var(--extnify-border-light);
    16081713    border-radius: 6px;
    16091714    padding: 18px 20px;
    … …  
    16151720    gap: 8px;
    16161721    padding-bottom: 10px;
    1617     border-bottom: 1px solid #f0ebfa;
     1722    border-bottom: 1px solid var(--extnify-accent-tint-2);
    16181723}
    16191724
    … …  
    16491754    border: 1px solid #f0c040;
    16501755    border-left: 3px solid #dba617;
    1651     border-radius: 3px;
     1756    border-radius: 4px;
    16521757    padding: 7px 10px;
    16531758    font-size: 12px;
    … …  
    16831788
    16841789.ext-wrap .ext-file-label {
    1685     display: inline-flex;
    1686     align-items: center;
    1687     gap: 5px;
    1688     font-size: 12px;
    1689     cursor: pointer;
    16901790    flex-shrink: 0;
    1691     padding: 4px 10px;
    1692     height: auto;
    1693     line-height: 1;
    1694 }
    1695 
    1696 .ext-file-label:focus-within {
     1791}
     1792
     1793.ext-wrap .ext-file-label:focus-within {
    16971794    border-color: var(--extnify-accent);
    1698     box-shadow: 0 0 0 1px var(--extnify-accent);
     1795    box-shadow: 0 0 0 3px var(--extnify-accent-ring);
    16991796}
    17001797
    … …  
    17251822.ext-wrap a.ext-io-btn:link,
    17261823.ext-wrap a.ext-io-btn:visited {
    1727     display: inline-flex;
    1728     align-items: center;
    1729     gap: 6px;
     1824    color: #fff;
    17301825    background: var(--extnify-accent);
    1731     border-color: var(--extnify-accent-dark);
    1732     color: var(--extnify-surface);
    1733     font-weight: 600;
    1734     font-size: 13px;
    1735     padding: 6px 14px;
    1736     height: auto;
    1737     box-shadow: none;
    1738     text-decoration: none;
    1739     transition: background .15s, border-color .15s;
     1826    border-color: var(--extnify-accent);
     1827    box-shadow: 0 1px 2px color-mix(in srgb, var(--extnify-accent) 35%, transparent);
    17401828}
    17411829
    … …  
    17431831.ext-wrap .ext-io-btn:focus {
    17441832    background: var(--extnify-accent-dark);
    1745     border-color: #5c3185;
    1746     color: var(--extnify-surface);
    1747     box-shadow: none;
     1833    border-color: var(--extnify-accent-dark);
     1834    color: #fff;
    17481835}
    17491836
    17501837.ext-wrap .ext-io-btn .dashicons,
    17511838.ext-wrap .ext-file-label .dashicons {
    1752     font-size: 15px;
    1753     width: 15px;
    1754     height: 15px;
    1755     line-height: 1;
    1756     flex-shrink: 0;
    1757     vertical-align: middle;
     1839    font-size: 16px;
     1840    width: 16px;
     1841    height: 16px;
    17581842}
    17591843
    … …  
    17611845.ext-wrap a.ext-io-btn-export:link,
    17621846.ext-wrap a.ext-io-btn-export:visited {
    1763     background: var(--extnify-link);
    1764     border-color: #135e96;
    1765     color: var(--extnify-surface);
     1847    color: #fff;
    17661848}
    17671849
    17681850.ext-wrap .ext-io-btn-export:hover,
    17691851.ext-wrap .ext-io-btn-export:focus {
    1770     background: #135e96;
    1771     border-color: #0a4b78;
    1772     color: var(--extnify-surface);
     1852    color: #fff;
    17731853}
    17741854
    … …  
    18041884        border-left: none;
    18051885        border: 1px solid var(--extnify-border);
    1806         border-radius: 3px;
     1886        border-radius: 4px;
    18071887        padding: 6px 10px;
    18081888    }
    … …  
    20072087   group rows and align its label + dropdown with the columns above. */
    20082088.ext-group-table tfoot .ext-group-foot-row td {
    2009     border-top: 2px solid #d9cded;
     2089    border-top: 2px solid var(--extnify-accent-border);
    20102090    background: var(--extnify-accent-tint);
    20112091}
    … …  
    21212201    font-style: normal;
    21222202    text-decoration: none;
    2123     border: 1px solid #b7d3ea;
     2203    border: 1px solid var(--extnify-accent-border);
    21242204    border-radius: 20px;
    2125     background: #f0f6fc;
     2205    background: var(--extnify-accent-tint);
    21262206}
    21272207
    … …  
    21372217    padding: 12px 14px;
    21382218    background: var(--extnify-bg);
    2139     border: 1px solid #e0e0e0;
    2140     border-radius: 4px;
     2219    border: 1px solid var(--extnify-border-light);
     2220    border-radius: var(--extnify-radius-sm);
    21412221    font-size: 13px;
    21422222    line-height: 1.5;
    … …  
    21532233    background: #e5f4fb;
    21542234    border: 1px solid #b6def0;
    2155     border-radius: 4px;
     2235    border-radius: var(--extnify-radius-sm);
    21562236    font-size: 13px;
    21572237    line-height: 1.5;
    … …  
    22882368.ext-ph-table td {
    22892369    padding: 5px 10px;
    2290     border: 1px solid #e0e0e0;
     2370    border: 1px solid var(--extnify-border-light);
    22912371    vertical-align: top;
    22922372    background: var(--extnify-surface);
    … …  
    23042384    background: #eef2f5;
    23052385    padding: 1px 5px;
    2306     border-radius: 3px;
     2386    border-radius: 4px;
    23072387    font-size: 12px;
    23082388}
    … …  
    23212401    background: #909090;
    23222402    border-color: #909090;
    2323     border-radius: 4px;
     2403    border-radius: var(--extnify-radius-sm);
    23242404    /* Fixed metrics so both (default .button and .button-small) render identically. */
    23252405    padding: 3px 11px;
    … …  
    23562436    padding: 6px;
    23572437    background: var(--extnify-surface);
    2358     border: 1px solid #b7d3ea;
    2359     border-radius: 4px;
     2438    border: 1px solid var(--extnify-accent-border);
     2439    border-radius: var(--extnify-radius-sm);
    23602440    box-shadow: 0 6px 18px rgba(0,0,0,.14);
    23612441    column-count: 1;   /* one option per line (base uses 2 columns) */
    … …  
    24122492    background: var(--extnify-accent);
    24132493    color: var(--extnify-surface);
    2414     border-radius: 4px;
     2494    border-radius: var(--extnify-radius-sm);
    24152495    font-size: 12px;
    24162496    line-height: 1.6;
  • extnify-fee/trunk/assets/js/admin.js

    r3751128 r3833938  
    144144    // Load a blank method form into a new pane keyed by a temporary id. The
    145145    // method is NOT persisted until the user clicks Save / Save All.
    146     function loadNewMethodPane( tempId, label ) {
     146    function loadNewMethodPane( tempId, label, seq ) {
    147147        var $loading = $( '#ext-method-loading' );
    148148        var $content = $( '#ext-method-content' );
    … …  
    164164                    // Seed the admin name with the default label so the sidebar
    165165                    // and the persisted record agree ("Untitled Method N").
    166                     $pane.find( '[name="xfeepro[display]"]' ).val( label );
     166                    $pane.find( '[name="extnify_fee[display]"]' ).val( label );
     167                    // Give the customer-facing Method Title a matching number too.
     168                    if ( seq ) {
     169                        $pane.find( '[name="extnify_fee[name]"]' ).val( 'Fee Title ' + seq );
     170                    }
    167171                } else {
    168172                    $content.append( '<div class="ext-method-pane"><p class="ext-error">' + ( i18n.loadError || 'Error loading method.' ) + '</p></div>' );
    … …  
    184188        var $item  = addMethodSidebarItem( tempId, label, true );
    185189        sidebarItemActive( $item );
    186         loadNewMethodPane( tempId, label );
     190        loadNewMethodPane( tempId, label, newMethodSeq );
    187191    });
    188192
    … …  
    250254    // real DB id. Falls back to creating an item if none is found.
    251255    function updateSidebarItem( $form, oldId, newId, display ) {
    252         var status      = $form.find( '[name="xfeepro[status]"]' ).val();
     256        var status      = $form.find( '[name="extnify_fee[status]"]' ).val();
    253257        var isActive    = status === '1';
    254258        var statusClass = isActive ? 'ext-method-active' : 'ext-method-inactive';
    … …  
    267271
    268272    // ── Live sidebar label: reflect the Admin Name as you type ─────────────────
    269     $( document ).on( 'input', '.ext-method-form [name="xfeepro[display]"]', function () {
     273    $( document ).on( 'input', '.ext-method-form [name="extnify_fee[display]"]', function () {
    270274        var val = $( this ).val();
    271275        if ( ! val.trim() ) return;   // don't blank the sidebar item
    … …  
    275279
    276280    // ── Live sidebar status: reflect the Status select as you change it ────────
    277     $( document ).on( 'change', '.ext-method-form [name="xfeepro[status]"]', function () {
     281    $( document ).on( 'change', '.ext-method-form [name="extnify_fee[status]"]', function () {
    278282        var isActive = $( this ).val() === '1';
    279283        var id    = $( this ).closest( '.ext-method-pane' ).attr( 'data-method-id' );
    … …  
    329333            .done( function ( resp ) {
    330334                if ( resp.success ) {
    331                     var enabled = $form.find( '[name="xfeepro[status]"]' ).val() === '1';
     335                    var enabled = $form.find( '[name="extnify_fee[status]"]' ).val() === '1';
    332336                    var $item   = addMethodSidebarItem( resp.data.id, resp.data.display, enabled );
    333337                    sidebarItemActive( $item );
    … …  
    401405    // ── Rate-type dependency logic ────────────────────────────────────────────
    402406
    403     $( document ).on( 'change', '[name^="xfeepro"][name$="[rate_type]"]', function () {
     407    $( document ).on( 'change', '[name^="extnify_fee"][name$="[rate_type]"]', function () {
    404408        updateRateDeps( $( this ).closest( '.ext-method-form' ) );
    405409    });
    … …  
    710714            $form.find( 'tr.ext-zone-row .ocm-checkgroup-checkbox' ).append(
    711715                '<label class="ext-cz-label">'
    712                 + '<input type="checkbox" name="xfeepro[zone][]" value="' + escAttr( val ) + '" checked /> '
     716                + '<input type="checkbox" name="extnify_fee[zone][]" value="' + escAttr( val ) + '" checked /> '
    713717                + escHtml( cLabel + ' — ' + label )
    714718                + '</label>'
    … …  
    928932    // chosen product (hidden id + name); otherwise it stays empty.
    929933    function rangeRowHtml( idx ) {
    930         var n = 'xfeepro[ranges][' + idx + ']';
     934        var n = 'extnify_fee[ranges][' + idx + ']';
    931935        // Free plugin: Start / End / Cost / Remove only (blocks, partial, per-product
    932936        // are Pro). Keep this in sync with get_ranges_html() in the controller.
    … …  
    966970        var $list = $( this ).closest( 'div' ).siblings( '.ext-sub-options-list' );
    967971        subOptIndex = $list.find( '.ext-sub-opt-row' ).length;
    968         var n   = 'xfeepro[sub_options][' + subOptIndex + ']';
     972        var n   = 'extnify_fee[sub_options][' + subOptIndex + ']';
    969973        $list.append(
    970974            '<div class="ext-sub-opt-row" data-index="' + subOptIndex + '">'
    … …  
    10791083            $list.empty();
    10801084            $.each( rows, function ( i, row ) {
    1081                 var n = 'xfeepro[sub_options][' + i + ']';
     1085                var n = 'extnify_fee[sub_options][' + i + ']';
    10821086                $list.append(
    10831087                    '<div class="ext-sub-opt-row" data-index="' + i + '">'
  • extnify-fee/trunk/bootstrap.php

    r3751128 r3833938  
    22defined( 'ABSPATH' ) || exit;
    33
    4 class XFee_Plugin {
     4class Extnify_Fee_Plugin {
    55
    66    private static $instance = null;
    … …  
    2020    private function includes(): void {
    2121        // Model + fee engine: needed on both frontend and admin.
    22         require_once XFEE_PLUGIN_PATH . 'admin/model.php';
    23         require_once XFEE_PLUGIN_PATH . 'front/class-fee.php';
     22        require_once EXTNIFY_FEE_PLUGIN_PATH . 'admin/model.php';
     23        Extnify_Fee_Model::maybe_upgrade(); // sync DB schema (handles updates, not just activation)
     24        require_once EXTNIFY_FEE_PLUGIN_PATH . 'front/class-fee.php';
    2425
    2526        if ( is_admin() ) {
    26             require_once XFEE_PLUGIN_PATH . 'system/library/ocm/autoloader.php';
    27             require_once XFEE_PLUGIN_PATH . 'admin/controller.php';
    28             new XFee_Back( new XFee_Model() );
     27            require_once EXTNIFY_FEE_PLUGIN_PATH . 'system/extnify-core/ui/autoloader.php';
     28            require_once EXTNIFY_FEE_PLUGIN_PATH . 'system/framework/traits/woo-helpers.php';
     29            require_once EXTNIFY_FEE_PLUGIN_PATH . 'admin/controller.php';
     30            new Extnify_Fee_Back( new Extnify_Fee_Model() );
    2931        }
    3032    }
    … …  
    5052            return;
    5153        }
    52         ( new XFee_Fee() )->apply( $cart );
     54        ( new Extnify_Fee_Fee() )->apply( $cart );
    5355    }
    5456
  • extnify-fee/trunk/extnify-fee.php

    r3772791 r3833938  
    44 * Plugin URI:        https://extnify.com/platforms/woocommerce
    55 * Description:       Conditional cart fees for WooCommerce — flat or percentage fees, gated by shipping zone, payment method or shipping method.
    6  * Version:           1.0.1
     6 * Version:           1.1.0
    77 * Author:            Extnify Labs LLC
    88 * Author URI:        https://extnify.com
    … …  
    2222defined( 'ABSPATH' ) || exit;
    2323
    24 // Build identity: FALSE = free build → no license verification, no phone-home.
    25 // Free and Pro ship under the SAME slug + main file, so they can never be active
    26 // together (installing one replaces the other in place) — this free build always
    27 // defines the flag.
    28 defined( 'EXTNIFY_DISTRIBUTION' ) || define( 'EXTNIFY_DISTRIBUTION', false );
    29 
    3024register_activation_hook( __FILE__, function() {
    3125    require_once plugin_dir_path( __FILE__ ) . 'admin/model.php';
    32     XFee_Model::create_table();
     26    Extnify_Fee_Model::maybe_upgrade();
    3327} );
    3428
    3529// Metadata single-source-of-truth (keep the PHP header above in sync — WordPress
    36 // reads that directly). Constants are uniquely prefixed (XFEE_*) so this free
     30// reads that directly). Constants are uniquely prefixed (EXTNIFY_FEE_*) so this free
    3731// plugin can never collide with the paid Extnify Fee Rules Pro (which uses EXTNIFY_*).
    3832// Closure-wrapped so $meta stays function-scoped (no global variable).
    … …  
    4034        $meta = json_decode( file_get_contents( plugin_dir_path( __FILE__ ) . 'extnify.json' ), true );
    4135
    42         define( 'XFEE_PLUGIN_VERSION',     $meta['version'] );
    43         define( 'XFEE_PLUGIN_NAME',        $meta['name'] );
    44         define( 'XFEE_PLUGIN_TEXT_DOMAIN', $meta['text_domain'] );
    45         define( 'XFEE_PLUGIN_REQUIRES_WC', $meta['requires_wc'] );
    46         define( 'XFEE_PLUGIN_TESTED_WC',   $meta['tested_wc'] );
    47         define( 'XFEE_PLUGIN_PATH',        plugin_dir_path( __FILE__ ) );
    48         define( 'XFEE_PLUGIN_URL',         plugin_dir_url( __FILE__ ) );
    49         define( 'XFEE_PLUGIN_FILE',        __FILE__ );
     36        define( 'EXTNIFY_FEE_PLUGIN_VERSION',     $meta['version'] );
     37        define( 'EXTNIFY_FEE_PLUGIN_NAME',        $meta['name'] );
     38        define( 'EXTNIFY_FEE_PLUGIN_TEXT_DOMAIN', $meta['text_domain'] );
     39        define( 'EXTNIFY_FEE_PLUGIN_REQUIRES_WC', $meta['requires_wc'] );
     40        define( 'EXTNIFY_FEE_PLUGIN_TESTED_WC',   $meta['tested_wc'] );
     41        define( 'EXTNIFY_FEE_PLUGIN_PATH',        plugin_dir_path( __FILE__ ) );
     42        define( 'EXTNIFY_FEE_PLUGIN_URL',         plugin_dir_url( __FILE__ ) );
     43        define( 'EXTNIFY_FEE_PLUGIN_FILE',        __FILE__ );
    5044
    5145        // Build-set "Upgrade to Pro" target. The WordPress.org build ships a URL (shows
    5246        // the card); the WooCommerce build ships "" (hides it, WooCommerce owns the upsell).
    53         define( 'XFEE_UPGRADE_URL', isset( $meta['upgrade_url'] ) ? (string) $meta['upgrade_url'] : '' );
     47        define( 'EXTNIFY_FEE_UPGRADE_URL', isset( $meta['upgrade_url'] ) ? (string) $meta['upgrade_url'] : '' );
    5448} )();
    5549
    … …  
    6963        add_action( 'admin_notices', function() {
    7064            echo '<div class="error"><p>'
    71                 . esc_html( XFEE_PLUGIN_NAME . ' requires WooCommerce to be installed and active.' )
     65                . esc_html( EXTNIFY_FEE_PLUGIN_NAME . ' requires WooCommerce to be installed and active.' )
    7266                . '</p></div>';
    7367        } );
    … …  
    7569    }
    7670
    77     require_once XFEE_PLUGIN_PATH . 'bootstrap.php';
    78     XFee_Plugin::instance();
     71    require_once EXTNIFY_FEE_PLUGIN_PATH . 'bootstrap.php';
     72    Extnify_Fee_Plugin::instance();
    7973
    8074} );
  • extnify-fee/trunk/extnify.json

    r3772791 r3833938  
    22    "name": "Extnify Fee Rules",
    33    "title": "Extnify Fee Rules for WooCommerce",
    4     "version": "1.0.1",
     4    "version": "1.1.0",
    55    "description": "Conditional cart fees for WooCommerce — flat or percentage fees, gated by shipping zone, payment method or shipping method.",
    66    "author": "Extnify Labs LLC",
  • extnify-fee/trunk/front/class-fee.php

    r3751128 r3833938  
    1717defined( 'ABSPATH' ) || exit;
    1818
    19 class XFee_Fee {
     19require_once __DIR__ . '/../system/extnify-core/traits/debug-log.php';
     20
     21class Extnify_Fee_Fee {
     22
     23    use Extnify_Debug_Log;
    2024
    2125    /** Free understands only the flat rate type. */
    … …  
    2327
    2428    /** Whether the global Debugging setting is on (computed per calculation). */
    25     private $debug = false;
     29    private $debug = null;
    2630
    2731    /**
    … …  
    3438        // When it is disabled, NO fees are applied — matching OpenCart. Absent =
    3539        // enabled (so a fresh install with configured fees works out of the box).
    36         $global = (array) get_option( 'x_feepro', array() );
     40        $global = (array) get_option( 'extnify_fee', array() );
    3741        $status = isset( $global['status'] ) ? (string) $global['status'] : '1';
    3842        if ( '1' !== $status ) {
    … …  
    4145        }
    4246
    43         $model = new XFee_Model();
     47        $model = new Extnify_Fee_Model();
    4448        $rows  = $model->getData();
    4549        if ( empty( $rows ) ) {
    … …  
    194198    // ── Debug log (gated by the global Debugging setting) ─────────────────────
    195199
    196     private function debug_enabled(): bool {
    197         $s = (array) get_option( 'x_feepro', array() );
    198         return isset( $s['debug'] ) && '1' === (string) $s['debug'];
    199     }
    200 
    201     /**
    202      * Append one entry to the debug log — only when Debugging is enabled.
    203      * Stored in the database (a capped transient), never written to a file.
    204      */
    205     private function log( string $level, string $message ): void {
    206         if ( ! $this->debug ) {
    207             return;
    208         }
    209         $entries = get_transient( 'x_feepro_debug_log' );
    210         if ( ! is_array( $entries ) ) {
    211             $entries = array();
    212         }
    213         $entries[] = array(
    214             'time'    => current_time( 'H:i:s' ),
    215             'level'   => strtolower( $level ),
    216             'message' => $message,
    217         );
    218         if ( count( $entries ) > 300 ) {
    219             $entries = array_slice( $entries, -300 );
    220         }
    221         set_transient( 'x_feepro_debug_log', $entries, WEEK_IN_SECONDS );
    222     }
     200    protected function debug_option_key(): string { return 'extnify_fee'; }
     201    protected function debug_log_key(): string    { return 'extnify_fee_debug_log'; }
    223202
    224203    /** The free subset of a method's fields. */
  • extnify-fee/trunk/readme.txt

    r3772791 r3833938  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.0.1
     7Stable tag: 1.1.0
    88Requires Plugins: woocommerce
    99WC requires at least: 7.1.0
    … …  
    2020Create as many fees as you need, set each one as a flat amount or a percentage of the subtotal, and limit when it applies by shipping zone, payment method and shipping method. A positive amount adds a fee; a negative amount shows as a discount. Everything is managed from one simple screen, and a built-in live log shows you exactly why a fee did or didn't apply.
    2121
    22 [Read the documentation »](https://extnify.com/docs/woocommerce/extnify-fee-rules-woocommerce) | [Try the live demo »](https://wc-dev.extnify.com/?auto_login=extnify-fee)
     22[Read the documentation »](https://extnify.com/docs/woocommerce/extnify-fee-rules-woocommerce) | [Try backend »](https://extnify-fee.extnify.com/wp-admin/) | [Try frontend »](https://extnify-fee.extnify.com/shop/)
    2323
    2424**See it in action:**
    … …  
    8888= More plugins by Extnify =
    8989
    90 * **Extnify Shipping Rules** — build your own conditional WooCommerce shipping methods and rates.
    91 * **Extnify Offer Rules** — let customers pick selectable discounts or add-ons at checkout.
     90* **Extnify Discount Rules** — rule-based product discounts shown as a sale across your store. [Free](https://wordpress.org/plugins/extnify-discount/) · [Pro](https://extnify.com/products/extnify-discount-rules-pro)
     91* **Extnify Offer Rules** — selectable discounts and optional add-ons for the cart and checkout. [Free](https://wordpress.org/plugins/extnify-offer/) · [Pro](https://extnify.com/products/extnify-offer-rules-pro-for-woocommerce)
     92* **Extnify Shipping Rules** — build your own conditional WooCommerce shipping methods and rates. [Free](https://wordpress.org/plugins/extnify-shipping/) · [Pro](https://extnify.com/products/extnify-shipping-pro-woocommerce)
    9293
    9394Extnify Fee Rules is built by Extnify, the team behind the X-FeePro extension for OpenCart.
    … …  
    141142== Changelog ==
    142143
     144= 1.1.0 =
     145* Rebuilt on the shared Extnify core, consistent with the other Extnify plugins.
     146* Your existing fees and settings are moved to the new storage automatically on update — nothing to re-enter.
     147* The database table now updates itself automatically after plugin updates.
     148* New fees get a numbered default title (Fee Title 2, Fee Title 3, …).
     149* Readme: new backend and frontend demo links.
     150
    143151= 1.0.1 =
    144152* Expanded the plugin listing (features, demo, FAQ).
    … …  
    150158== Upgrade Notice ==
    151159
     160= 1.1.0 =
     161Your fees and settings are moved to the new storage automatically. As always, back up your site before updating.
     162
    152163= 1.0.1 =
    153164Refreshed the plugin listing and corrected the in-admin Documentation link.
  • extnify-fee/trunk/system/framework/traits/woo-helpers.php

    r3751128 r3833938  
    11<?php
    22/**
    3  * XFee_Woo_Helpers — WooCommerce-specific admin helpers shared across plugins:
     3 * Extnify_Fee_Woo_Helpers — WooCommerce-specific admin helpers shared across plugins:
    44 * shipping-rate cache busting, zone (country→state) lookup, and brand
    55 * taxonomy detection. Composed into an admin controller.
    … …  
    77defined( 'ABSPATH' ) || exit;
    88
    9 trait XFee_Woo_Helpers {
     9trait Extnify_Fee_Woo_Helpers {
    1010
    1111    public function ajax_get_zones() {
    … …  
    2727                $zones[] = array(
    2828                    'value' => $code . ':' . $state_code,
    29                     'name'  => \Extnify\XFee\Ocm\Misc::decode( $country_name . ' — ' . $state_name ),
     29                    'name'  => \Extnify\Fee\Ui\Misc::decode( $country_name . ' — ' . $state_name ),
    3030                );
    3131            }
  • extnify-fee/trunk/uninstall.php

    r3751128 r3833938  
    1212
    1313// The debug log is transient (ephemeral) data — always clear it.
    14 delete_transient( 'x_feepro_debug_log' );
     14delete_transient( 'extnify_fee_debug_log' );
    1515
    16 delete_option( 'x_feepro' );
     16delete_option( 'extnify_fee' );
     17// Drop the stored schema version so a later reinstall recreates the table.
     18delete_option( 'extnify_fee_db_version' );
    1719require_once plugin_dir_path( __FILE__ ) . 'admin/model.php';
    18 XFee_Model::drop_table();
     20Extnify_Fee_Model::drop_table();
Note: See TracChangeset for help on using the changeset viewer.