Plugin Directory

Changeset 3788777


Ignore:
Timestamp:
11/06/2026 09:53:14 PM (8 hours ago)
Author:
brainiacbusiness
Message:

Rollora 1.0.1: fix stale Active price book line on approval response

Location:
rollora/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • rollora/trunk/includes/class-blinds-admin.php

    r3788554 r3788777  
    404404            plugin_dir_url(__FILE__) . '../assets/admin.css',
    405405            [],
    406             '1.0.0'
     406            '1.0.1'
    407407        );
    408408    });
  • rollora/trunk/includes/class-blinds-import-admin.php

    r3788554 r3788777  
    235235    }
    236236
    237     if ($active !== null) {
    238         echo '<h2>Active price book</h2><p>Book #' . esc_html((string) $active['id'] ?? '')
    239             . ' — source: ' . esc_html((string) $active['source_filename'] ?? '')
    240             . ' — rows: ' . esc_html((string) count($active['rows'] ?? []))
    241             . ' — label: ' . esc_html((string) ($active['data_label'] ?? 'SYNTHETIC'))
    242             . ' — activated by user ' . esc_html((string) $active['activated_by'] ?? '')
    243             . ' at ' . esc_html((string) $active['activated_at'] ?? '') . '</p>';
    244     } else {
    245         echo '<h2>Active price book</h2><p>None active yet.</p>';
    246     }
    247 
    248237    /* ---- Step (c): approve (handled before rendering the forms) ---- */
    249238    if (!empty($_POST['blinds_price_books_approve'])
    … …  
    296285    }
    297286
     287    /* ---- Active price book (rendered AFTER the approve/rollback
     288     * handlers above, so it names the book that is active now) ----
     289     * 1.0.1 fix: this line was previously rendered before the approve
     290     * handler ran, so on the approval response it still named the
     291     * previous active book while the notice and history table below
     292     * already showed the newly activated one. $active is re-fetched
     293     * by the handlers above after any activation or rollback. */
     294    if ($active !== null) {
     295        echo '<h2>Active price book</h2><p>Book #' . esc_html((string) $active['id'] ?? '')
     296            . ' — source: ' . esc_html((string) $active['source_filename'] ?? '')
     297            . ' — rows: ' . esc_html((string) count($active['rows'] ?? []))
     298            . ' — label: ' . esc_html((string) ($active['data_label'] ?? 'SYNTHETIC'))
     299            . ' — activated by user ' . esc_html((string) $active['activated_by'] ?? '')
     300            . ' at ' . esc_html((string) $active['activated_at'] ?? '') . '</p>';
     301    } else {
     302        echo '<h2>Active price book</h2><p>None active yet.</p>';
     303    }
     304
    298305    /* ---- Step (a): upload ---- */
    299306    echo '<h2>Step 1 — Upload CSV</h2>';
  • rollora/trunk/includes/class-blinds-lifecycle.php

    r3788554 r3788777  
    1616 * defaults ONLY if no valid stored config exists — an existing admin
    1717 * config is never overwritten. It also records wp_option
    18  * 'blinds_plugin_version' = '1.0.0'.
     18 * 'blinds_plugin_version' = '1.0.1'.
    1919 *
    2020 * Deactivation deletes nothing and removes no options, so a temporary
    … …  
    6565        }
    6666    }
    67     update_option('blinds_plugin_version', '1.0.0');
     67    update_option('blinds_plugin_version', '1.0.1');
    6868}
    6969
  • rollora/trunk/readme.txt

    r3788615 r3788777  
    77WC requires at least: 11.2
    88WC tested up to: 11.2
    9 Stable tag: 1.0.0
     9Stable tag: 1.0.1
    1010License: GPLv2 or later
    1111License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    2727== Installation ==
    2828
    29 1. Install the plugin ZIP via WordPress Admin > Plugins > Add New > Upload Plugin, then activate it. Activation seeds the supplier configuration from the synthetic defaults and records plugin version 1.0.0. It never overwrites an existing admin configuration.
     291. Install the plugin ZIP via WordPress Admin > Plugins > Add New > Upload Plugin, then activate it. Activation seeds the supplier configuration from the synthetic defaults and records plugin version 1.0.1. It never overwrites an existing admin configuration.
    30302. Create a simple WooCommerce product for a roller blind and note its ID.
    31313. Add `[blinds_roller_configurator product_id="123"]` to a page, replacing 123 with your product ID.
    … …  
    106106== Screenshots ==
    107107
    108 1. The customer configurator: width, drop, fit, fabric, control side, bracket, and options, with the price calculated server-side.
    109 2. Supplier Settings: deductions, size limits, roll widths, fabrics, and options, with the synthetic defaults clearly labelled.
    110 3. Price Books: controlled CSV import with preview, approval, and a history table with one-click rollback to a superseded book.
     108Screenshots are to be captured at submission time from a working installation. None exist yet, and none are claimed here. Intended screenshots:
     109
     1101. Customer configurator: width, drop, fit, fabric, and options on a product page.
     1112. Cart and checkout showing the server-calculated blind price and a per-order fee shown separately.
     1123. Supplier Settings admin screen with deductions, size limits, and roll widths.
     1134. Price Books screen: CSV preview with staged rows, row-level errors, and diff against the active book.
     1145. Workshop production sheet generated from a saved order snapshot.
     1156. Price-book history and rollback view.
    111116
    112117== Changelog ==
     118
     119= 1.0.1 — 2026-11-06 =
     120
     121* Fixed: the "Active price book" line on the Price Books admin page showed the previously active book on the approval response after activating a new price book, while the success notice and the history table already showed the newly activated book. The line is now rendered after the approve/rollback handlers run, so it always names the book that is active now. No pricing, measurement, activation, or other behaviour changed.
    113122
    114123= 1.0.0 — 2026-11-02 =
  • rollora/trunk/rollora.php

    r3788554 r3788777  
    33 * Plugin Name:       Rollora – Made-to-Measure Roller Blinds
    44 * Description:       Roller blinds only. Configurator, server-side matrix/band/per-m2 pricing, controlled CSV price-book import, immutable order snapshots, and workshop production sheets. Engine prices are tax-exclusive; WooCommerce calculates applicable taxes. Default data is SYNTHETIC until an admin replaces it with real supplier rules.
    5  * Version:           1.0.0
     5 * Version:           1.0.1
    66 * Requires at least: 7.1
    77 * Requires PHP:      8.3
    … …  
    3737/** Enqueue the responsive configurator/workshop stylesheet on the frontend. */
    3838add_action('wp_enqueue_scripts', function () {
    39     wp_enqueue_style('blinds-configurator', BLINDS_PROTO_URL . 'assets/configurator.css', [], '1.0.0');
     39    wp_enqueue_style('blinds-configurator', BLINDS_PROTO_URL . 'assets/configurator.css', [], '1.0.1');
    4040});
    4141
Note: See TracChangeset for help on using the changeset viewer.