Plugin Directory

Changeset 3464833


Ignore:
Timestamp:
02/19/2026 08:16:21 AM (2 days ago)
Author:
lessizoli
Message:
  • NEW: High-Performance SQL Engine – Saving hundreds of prices is now near-instant, bypassing heavy WooCommerce background tasks.
  • NEW: Lightweight Data Engine – Optimized product loading ensures the dashboard remains responsive even with 500+ products.
  • FIX: Real-time Price Sync – Added automatic cache flushing so new prices appear on your shop frontend immediately[cite: 34].
  • FIX: Memory Optimization – Drastically reduced server RAM usage during bulk edits.
Location:
priceboard-lite
Files:
16 added
2 edited

Legend:

Unmodified
Added
Removed
  • priceboard-lite/trunk/priceboard-lite.php

    r3456301 r3464833  
    44 * Plugin URI:   https://priceboard.hu/plugin-info/
    55 * Description:  Fast WooCommerce price editor for Simple products with live search.
    6  * Version:      1.4.1
     6 * Version:      1.4.2
    77 * Author:       PriceBoard
    88 * Author URI:   https://priceboard.hu
     
    289289}
    290290
    291     public function save_prices() {
    292         // Jogosultság ellenőrzése
     291    public function save_prices() {
     292        global $wpdb;
    293293        if (!current_user_can('manage_woocommerce')) return;
    294        
    295         // Biztonsági nonce ellenőrzése
    296294        check_admin_referer('priceboard_save', 'priceboard_nonce');
    297295       
    298         // Ellenőrizzük, hogy érkeztek-e adatok
    299296        if (!isset($_POST['prices']) || !is_array($_POST['prices'])) return;
    300        
     297
    301298        foreach ($_POST['prices'] as $id => $data) {
    302             $product = wc_get_product(intval($id));
    303            
     299            $id = intval($id);
    304300            // Csak egyszerű termékeket mentünk a Lite verzióban
    305             if ($product && $product->get_type() === 'simple') {
    306                
    307                 // Árak tisztítása (szóközök eltávolítása, tizedesvessző javítása)
    308                 $reg  = sanitize_text_field(str_replace([' ', ','], ['', '.'], $data['regular']));
    309                 $sale = sanitize_text_field(str_replace([' ', ','], ['', '.'], $data['sale']));
    310                
    311                 $product->set_regular_price($reg);
    312                 $product->set_sale_price($sale);
    313                
    314                 // --- ÚJ: Akciós dátumok mentése ---
    315                 // Ha üres a dátum, a WooCommerce törli a korábbi korlátozást
    316                 $product->set_date_on_sale_from(sanitize_text_field($data['date_from']));
    317                 $product->set_date_on_sale_to(sanitize_text_field($data['date_to']));
    318                
    319                 // Adatok véglegesítése
    320                 $product->save();
     301            $post_type = $wpdb->get_var($wpdb->prepare("SELECT post_type FROM {$wpdb->posts} WHERE ID = %d", $id));
     302            if ($post_type !== 'product') continue;
     303
     304            // Árak tisztítása
     305            $reg  = sanitize_text_field(str_replace([' ', ','], ['', '.'], $data['regular']));
     306            $sale = sanitize_text_field(str_replace([' ', ','], ['', '.'], $data['sale']));
     307
     308            // 1. Alapár és Akciós ár SQL frissítése
     309            update_post_meta($id, '_regular_price', $reg);
     310           
     311            if ($sale !== '') {
     312                update_post_meta($id, '_sale_price', $sale);
     313                $final_price = (floatval($sale) < floatval($reg)) ? $sale : $reg;
     314            } else {
     315                delete_post_meta($id, '_sale_price');
     316                $final_price = $reg;
    321317            }
     318            update_post_meta($id, '_price', $final_price);
     319
     320            // 2. Akciós dátumok mentése (update_post_meta-val az integritásért)
     321            update_post_meta($id, '_sale_price_dates_from', sanitize_text_field($data['date_from']));
     322            update_post_meta($id, '_sale_price_dates_to', sanitize_text_field($data['date_to']));
     323           
     324            // 3. Cache törlése termékenként
     325            wc_delete_product_transients($id);
    322326        }
    323327       
    324         // Visszairányítás siker üzenettel
    325328        wp_redirect(admin_url('admin.php?page='.self::SLUG.'&saved=1'));
    326329        exit;
  • priceboard-lite/trunk/readme.txt

    r3456301 r3464833  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.4.1
     7Stable tag: 1.4.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    1111== Description == (English)
     12Built for Speed:" PriceBoard Lite now features an enterprise-grade SQL engine. While other plugins struggle with 100+ products, PriceBoard handles hundreds of price updates in seconds without breaking a sweat or slowing down your server.
    1213PriceBoard Lite is the fastest bulk pricing dashboard for WooCommerce. Stop wasting time opening products one by one! Manage simple product prices, sale prices, and promotional schedules instantly from a single, intuitive interface.
    1314The plugin features a high-performance Live Search that lets you find products by SKU or name in milliseconds. With the new Bulk Action Panel, you can apply percentage or fixed price changes to multiple products at once, including support for decimal values and scheduled sales.
     
    6566== Changelog ==
    6667
    67 = 1.4.0 =
     68= 1.4.2 =
     69
     70* NEW: High-Performance SQL Engine – Saving hundreds of prices is now near-instant, bypassing heavy WooCommerce background tasks.
     71* NEW: Lightweight Data Engine – Optimized product loading ensures the dashboard remains responsive even with 500+ products.
     72* FIX: Real-time Price Sync – Added automatic cache flushing so new prices appear on your shop frontend immediately[cite: 34].
     73* FIX: Memory Optimization – Drastically reduced server RAM usage during bulk edits.
     74
     75= 1.4.1 =
    6876
    6977NEW: Bulk Edit Target Selection - Apply changes to Regular Price, Sale Price, or Both.
Note: See TracChangeset for help on using the changeset viewer.