=== ShopBoost – WooCommerce Toolkit === Contributors: wpsupporting Donate link: https://paypal.me/gdimitrovbg Tags: woocommerce, minimum order, bulk edit, redirect, woocommerce checkout Requires at least: 6.1 Tested up to: 7.0 Requires PHP: 7.4 Stable tag: 1.7.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html All-in-one WooCommerce toolkit: minimum orders, auto-add, bulk edit, redirects, BGN↔EUR, size charts, quick orders, checkout fields and more. == Description == **ShopBoost** is a comprehensive WooCommerce toolkit that replaces multiple separate plugins with a single, unified solution. Every feature has its own dedicated settings page and can be enabled or disabled independently β€” so you only run the code you actually use. Whether you want to increase average order value, streamline your checkout, manage redirects, or display BGN/EUR prices side by side, ShopBoost has you covered β€” all from one clean admin interface. = πŸ›’ Minimum Order Amount = Set a minimum cart amount that customers must reach before completing checkout. Displays a customisable warning notice in the cart and/or at checkout. Supports dynamic placeholders (`{minimum_amount}`, `{current_amount}`, `{remaining_amount}`), multiple display locations, and full visual customisation (colours, font, size) with live preview. = πŸ”— Direct Checkout Links (Product Links) = Generate direct-to-checkout links for any product. One click adds the product to the cart and takes the customer straight to checkout β€” perfect for promotions, email campaigns, and social media. Full support for variable products with a variation selection popup. = βž• Auto Add Product = Automatically add a free gift, sample, or promotional product to the cart when the customer reaches a set amount. Supports multiple products with individual thresholds, discount options (percentage, fixed amount, or set price), and automatic removal when the cart drops below the threshold. = πŸ”„ Redirect Manager = Manage 301, 302, and 410 redirects directly from the WordPress admin β€” no `.htaccess` editing required. Create, edit, enable/disable, and delete redirect rules from a clean table interface. Ideal for handling product URL changes, seasonal campaigns, and fixing broken links without losing SEO value. = πŸ“ Checkout Field Editor = Add custom fields to the WooCommerce checkout form (text, number, checkbox, select, textarea). Show or hide default WooCommerce fields. Drag-and-drop reordering. Custom field data is saved to the order and displayed in the admin order view and transactional emails. = πŸ’± BGN ↔ EUR Dual Currency = Display the secondary currency equivalent next to every price in your store β€” product listings, variable product ranges, cart, mini-cart, order totals, My Account, and emails. Works in both directions: BGN stores show EUR, EUR stores show Π»Π². Uses the official fixed ECB conversion rate (1 EUR = 1.95583 Π»Π².) which is set by EU law and cannot be changed. Configurable display format (brackets or slash) and position. = πŸ“Š Price Variation Display = Show all product variation prices in a structured table or visual layout directly on the product page β€” no more clicking through dropdowns. Choose from five display templates: Table, Cards, Badges, Pills, or Checkbox. Fully customisable colours, sizes, and highlight options. = πŸ“ Size Chart = Add a size guide to any product β€” displayed as a product tab, via shortcode, or as a popup button. The editor is fully visual: add and remove rows and columns, enter your measurements, and save. Can be assigned per product, per category, or globally. = 🚚 Conditional Free Shipping = Automatically hide specific shipping methods when certain products are in the cart. For example: hide "Free Shipping" when a heavy or oversized product is added. Supports ANY (at least one product) and ALL (all products must be present) matching modes. = πŸ”€ URL Transliteration = Automatically converts Cyrillic characters in product, category, and post slugs to Latin on save β€” essential for SEO on Bulgarian-language stores. Also includes a manual transliteration tool for converting any text. = πŸ›οΈ Bulk Edit Products = Edit prices and stock levels across your entire catalogue from a single table view. Apply mass discounts (percentage off, fixed reduction, or set price) to selected products at once. Original prices are backed up automatically β€” restore them with one click. Full support for variable products and product variations. = ⚑ Performance First = Every feature is fully gated behind its toggle. When a feature is disabled, zero hooks are registered β€” WordPress never even loops through them. Admin assets load only on plugin pages. Frontend CSS loads only on WooCommerce pages. = πŸ”’ Security = Built to WordPress coding standards: nonce verification on every form and AJAX request, capability checks, prepared SQL statements, sanitised inputs, and escaped outputs throughout. = Theme Compatibility = Works with any theme that follows WooCommerce standards. Includes dedicated integration layers for **Woodmart** (AJAX cart + dark mode), **Divi**, and **WooCommerce Blocks** (Gutenberg checkout). = Translations = Includes translations for: English, Bulgarian (bg_BG), German (de_DE), Spanish (es_ES), Greek (el_GR). == Installation == 1. Make sure WooCommerce is installed and activated. 2. Install ShopBoost from the WordPress plugin directory, or upload the ZIP via **Plugins β†’ Add New β†’ Upload Plugin**. 3. Activate the plugin. 4. Go to **ShopBoost** in your WordPress admin menu. 5. Enable the features you need from the **General Functions** page and configure each one from its own settings page. == Frequently Asked Questions == = Do I need to enable all features? = No. Every feature has its own toggle on the General Functions page. Enable only what you need β€” disabled features register zero code and have no performance impact. = Is it compatible with WooCommerce HPOS? = Yes. ShopBoost fully supports WooCommerce High-Performance Order Storage (HPOS). Custom checkout fields use the Order CRUD API. = Will it work with my theme? = Yes. ShopBoost uses standard WooCommerce hooks and works with any properly coded theme. Dedicated integration layers are included for Woodmart, Divi, and Gutenberg Blocks. = Is the BGN/EUR conversion rate configurable? = No β€” and intentionally so. The rate of 1 EUR = 1.95583 Π»Π². is fixed by EU law for Bulgaria's eurozone accession and cannot legally be changed. ShopBoost uses this rate exclusively. = Can I customise the minimum order notice appearance? = Yes. The Minimum Order settings page provides full visual control: text colour, background colour, border colour, highlight colours for each placeholder, font family, size, and weight β€” all with a live preview. = Does it work with caching plugins? = Yes. ShopBoost is compatible with all major caching plugins including WP Rocket, W3 Total Cache, LiteSpeed Cache, and WP Super Cache. = Where can I get support? = Visit [wpsupporting.com/support](https://wpsupporting.com/support) to open a support ticket. Free registration is required. == Screenshots == 1. General Functions – overview of all available features with enable/disable toggles for each module (Minimum Order, Product Links, Auto Add Product, URL Transliteration, Redirect, Checkout Field Editor, Price Variation, Size Chart, Conditional Free Shipping, BGN ↔ EUR and more). 2. Bulk Edit Products – manage prices and stock across all products in a table view. Apply mass discounts (percentage, fixed amount, or set price) with automatic backup and one-click restore of original prices. Supports variable products with SKU and stock columns. 3. Redirect Manager – create and manage 301/302/410 redirects directly from the admin panel without touching .htaccess. Includes SEO benefits overview (preserve link equity, fix broken links, manage product URL changes). 4. BGN ↔ EUR Dual Currency – configure where the secondary currency is displayed (product prices, cart, order totals, mini-cart, emails) and choose the display format (brackets or slash) with live preview. Uses the official fixed ECB rate (1 EUR = 1.95583 Π»Π².). == Changelog == = 1.7.4 = * **Fix – URL Transliteration broke menu links:** Display-time filters (`wp_nav_menu_items`, `the_content`, `the_excerpt`) were transliterating URLs on output without checking whether the underlying slug had actually been changed β€” producing links to non-existent pages. Removed all three display-time hooks; transliteration now happens exclusively at save time and via the manual/auto scan, which is the correct approach. * **Fix – URL Transliteration could not transliterate taxonomy terms:** `apply_manual_transliteration()` called `get_term_by('slug', ..., '')` with an empty taxonomy string. WordPress's `taxonomy_exists('')` returns `false`, so the lookup always failed silently β€” no category, tag, or product-category slug was ever updated. Now iterates all public taxonomies. Also added `urldecode()` on the slug extracted from the URL path so URL-encoded Cyrillic characters match the database value. * **Fix – "Run Scan Now" button did nothing when Automatic Scanning was off:** The button called `auto_scan_and_transliterate()`, which checks `flexmior_auto_scan_enabled` and returns early when disabled. Added a dedicated `run_scan_now()` method that always executes regardless of the auto-scan toggle. * **New – URL Health Status dashboard:** The URL Transliteration settings page now shows a live health-status card at the top that loads automatically on page open. Displays the count of untransliterated URLs grouped by type (Post, Page, Product, Category, Menu Link) with original vs. transliterated URLs side by side. Includes a one-click **Transliterate All** button and a **Fix Selected Menu Links** action for custom-link menu items. * **New – Menu custom-link scanning:** The health check now also scans WordPress navigation menus for custom-link items containing Cyrillic URLs, which the existing post/term scan did not cover. Detected menu links can be fixed individually or via the Transliterate All action. * **Fix – Minimum Order feature enabled by default on fresh install:** The `flexmior_feature_minimum_order_enabled` option defaulted to `1` in five places, causing it to appear active immediately after plugin installation. Changed all defaults to `0` β€” all features now start disabled and must be explicitly enabled by the admin. * **Fix – Quick Order: variable product variation not recorded:** The form did not capture the selected variation. Added a hidden `variation_id` field, JavaScript listener for WooCommerce `found_variation`/`reset_data` events, server-side validation (variation must belong to the parent product), and variation-aware display in admin list, detail view, email notifications, and Convert to Order. * **Fix – Quick Order: public submit endpoint worked with feature disabled:** The AJAX handler was registered unconditionally but did not check the feature toggle, allowing submissions even when Quick Order was turned off. Added an early `flexmior_feature_quick_order_enabled` check. * **Fix – Quick Order: empty text options left buttons unlabelled:** Saving an empty Form Title, Submit Button Text, or Collapsed Button Text resulted in blank labels. Added a `get_text_option()` helper that falls back to the default value when the stored option is an empty string. * **Fix – Quick Order: WooCommerce HPOS incompatible order links:** Hardcoded `post.php?post=X&action=edit` URLs do not work when High-Performance Order Storage is active. Replaced with `$order->get_edit_order_url()` in the orders list, detail modal, and Convert to Order response. = 1.7.3 = * **New Feature – Quick Order:** Customer-facing quick order form (renders automatically under Add to Cart, or via the `[flexmior_quick_order]` shortcode, or as a modal popup). Three display modes: **Inline** (form shown directly under Add to Cart), **Inline + Collapsible** (form starts hidden behind a single button β€” click to slide it open), and **Modal** (small trigger button opens a popup). Fully configurable field builder (text, textarea, email, tel, number, select, checkbox, radio β€” drag to reorder, mark as required, custom placeholders/options). Submissions are stored in a dedicated `wp_flexmior_quick_orders` table and listed under **ShopBoost β†’ Quick Orders** with filters (status, search), detail modal, status updates (new / processing / done / rejected), and a one-click **Convert to Order** action that creates a real WooCommerce order. Email notifications: admin alert + optional customer confirmation. Built-in anti-spam: honeypot field (autofill-safe naming) + per-IP rate limiting (configurable). * **New Feature – Quick Order: Full button styling:** Dedicated "Button appearance" admin card lets you customise background color, hover color, text color, font family (13 presets + theme inherit), font size, font weight, padding, and border radius β€” all with a live preview that updates in real time. Styles are injected as inline CSS only when overridden; defaults stay clean. * **New Feature – Quick Order: Admin bar integration:** "Quick Orders" link added to the ShopBoost dropdown in the WordPress admin bar for one-click access to incoming submissions from anywhere in the admin. * **Improvement – Bulk Edit Products: Name and Slug inline editing:** Click any product name or slug cell to edit in place; saves on Enter/blur. Slugs are properly decoded from URL-encoded Cyrillic on display and re-sanitised on save. Blur without changes no longer triggers a save. * **Improvement – Mass Discount: Scheduled date range:** Each promotion can now be assigned a `from` / `to` date β€” WooCommerce native sale-price scheduling kicks in automatically. Promotion cards show a status badge (Active / Scheduled / Expired) plus the date range. * **Fix – Quick Order rendered inside the WooCommerce cart form:** Switched the auto-render hook from `woocommerce_after_add_to_cart_button` (inside the cart form) to `woocommerce_after_add_to_cart_form` (after the closing tag). The old placement produced nested forms β€” on certain themes the Quick Order submit was hijacked by the cart form, adding the product to the cart instead of saving the quick-order submission. Click handlers on the modal trigger and collapsible toggle now also call `preventDefault()` / `stopPropagation()` as a second line of defence. * **Fix – Quick Order modal showed "Submission failed" instead of the form:** In modal mode no inline form was rendered, so the JS had nothing to clone into the modal. The fallback message used the generic "Submission failed" string, which looked like a server error. The modal now pre-renders the form inside the container at page load β€” clicking the trigger shows the ready-to-use form instantly. * **Fix – Quick Order honeypot blocked legitimate submissions:** The hidden anti-spam field was named `flexmior_qo_website` with a label of "Website", which password managers and browser autofill commonly fill in automatically β€” triggering false-positive rejections. Renamed to a non-semantic name with `autocomplete="new-password"`, `opacity:0`, and `pointer-events:none` so autofill ignores it entirely. * **Fix – Quick Order button-in-button when modal mode + collapsible were both enabled:** Collapsible is now strictly an inline-mode feature. When Modal display mode is selected the Collapsible options are hidden in the admin UI and ignored on the front end, so the popup no longer contains a nested toggle button. = 1.7.2 = * **New Feature – Mass Discount module:** Separated into its own independent module with a dedicated admin page and its own On/Off toggle in General Functions. Supports named promotions β€” each discount run is saved with a custom label (e.g. "Summer Sale"), percentage, and date. The promotions panel on the left lists all active promotions with live product counts; clicking a promotion filters the product table to show only the products in that promotion. Original prices are backed up automatically and can be restored per-product or in bulk at any time. Products discounted before this feature was introduced continue to work normally under "All with active discount". * **Improvement – Bulk Edit Products: SKU inline editing:** SKU cells in the Bulk Edit Products table are now inline-editable. Click any SKU cell to edit in place; uniqueness is validated server-side before saving (duplicate SKUs are rejected with an error message). Variable products support SKU editing directly in the table. * **Fix – Product filter not applied in Mass Discount:** Switching to `WP_Query` directly (replacing `wc_get_products()`) to fix paginated meta-query filtering. `wc_get_products()` silently ignored `meta_query` in paginated requests, causing the promotion filter to return all products instead of the filtered set. = 1.7.1 = * **Bug fix – Admin styles and scripts not loading:** All plugin sub-pages (Minimum Order, Product Links, Auto Add Product, URL Transliteration, Redirect, etc.) were loading without any admin styles or JavaScript. Root cause: WordPress generates sub-page screen IDs from the sanitised menu *title* (`sanitize_title('ShopBoost')` β†’ `shopboost`), producing IDs like `shopboost_page_flexmior-*`. The previous detection used `strpos($screen_id, 'flexible-minimum-order')` which never matched these IDs. Fixed by also checking for `flexmior` in both `$screen->id` and the `$hook` parameter β€” now covers all current and future plugin pages reliably. * **Bug fix – Auto Add Product product list not injected:** The product list for the Auto Add Product page was gated behind a strict equality check against a hardcoded screen ID (`flexible-minimum-order_page_flexmior-auto-add-product`) that was also affected by the same naming issue above. Replaced with a `strpos()` check so the product data is correctly passed to JavaScript regardless of the screen ID prefix. * **Improvement – Minimum Order settings page redesign:** Rebuilt with a proper two-column card layout (Basic Settings + Custom Message + Shortcode on the left; Notice Colors + Typography on the right). Fixed a broken form structure where `
` opened inside the left column while Visual Settings and the Save button were outside it β€” meaning visual settings were never actually submitted. Added toggle switches, a live message preview, a live visual preview (colours and typography), and a one-click shortcode copy button. = 1.7.0 = * **New Feature – BGN ↔ EUR Dual Currency:** Shows the secondary currency equivalent next to every price across the store (product listings, variable product ranges, cart item prices and subtotals, cart grand total, mini-cart, order pages, My Account, and transactional emails). Works in both directions β€” BGN stores show EUR (Γ· 1.95583); EUR stores show Π»Π². (BGN) (Γ— 1.95583). Uses the fixed ECB conversion rate (1 EUR = 1.95583 BGN). Configurable display format (brackets or slash), position (after or before), and independent per-location toggles. Settings page adapts automatically to the active store currency. * **Performance – Feature hooks:** Every feature toggle now truly disables its code path. All Auto Add Product hooks (six in total) are now gated behind the feature toggle β€” zero callbacks registered when the feature is off. * **Performance – Admin asset loading:** Replaced 19 redundant page-detection `if` blocks in `admin_scripts()` with a single `strpos()` check on the screen ID. Covers all current and future plugin pages automatically. Product Links admin bundle now loads only when the Product Links feature is enabled. * **Performance – Color CSS variables:** Notice colour overrides moved from a raw `wp_head` echo to `wp_add_inline_style()`, removing a separate render-blocking `