Plugin Directory

Changeset 3698814


Ignore:
Timestamp:
09/16/2026 02:48:46 PM (5 weeks ago)
Author:
hamzaafridi05
Message:

Release 2.0.3: fix the Add Field button in the field editor

Saving a new field stopped on a script error because the free build has no show-if or options input, so no field could be added to a calculator. Missing inputs are now read as empty and fields save again. Tagged 2.0.3.

Location:
pricewise-calculator-pro
Files:
74 added
3 edited

Legend:

Unmodified
Added
Removed
  • pricewise-calculator-pro/trunk/README.txt

    r3677892 r3698814  
    44Requires at least: 5.8
    55Tested up to: 7.1
    6 Stable tag: 2.0.2
     6Stable tag: 2.0.3
    77Requires PHP: 7.4
    88License: GPLv2 or later
    … …  
    196196== Changelog ==
    197197
     198= 2.0.3 - 2026-09-16 =
     199* Fix: the Add Field button in the field editor did nothing. Saving a new field stopped on a script error, so no field could be added to a calculator. Fields now save as they should.
     200
    198201= 2.0.2 - 2026-08-30 =
    199202* Fix: the admin menu was still called "Calculator Pro". It is now called PriceWise, so it matches the plugin name and the setup steps on this page.
    … …  
    221224== Upgrade Notice ==
    222225
     226= 2.0.3 =
     227Fixes the Add Field button in the field editor, which did nothing when you saved a new field. Your calculators and settings are untouched.
     228
    223229= 2.0.2 =
    224230The admin menu is now called PriceWise instead of Calculator Pro. Your calculators and settings are untouched.
  • pricewise-calculator-pro/trunk/assets/js/all-admin-js/admin-calculator-field-formula.js

    r3566319 r3698814  
    731731            var fieldType = $('#modal-field-type').val();
    732732            var fieldData = {
    733                 label: $('#modal-field-label').val().trim(),
    734                 key: $('#modal-field-key').val().trim(),
     733                label: ($('#modal-field-label').val() || '').trim(),
     734                key: ($('#modal-field-key').val() || '').trim(),
    735735                type: fieldType,
    736736                required: $('#modal-field-required').is(':checked') ? 1 : 0,
    737                 default_value: $('#modal-field-default').val().trim()
     737                default_value: ($('#modal-field-default').val() || '').trim()
    738738            };
    739739
    … …  
    748748    case 'radio':
    749749    case 'checkbox':
    750         fieldData.options = $('#modal-field-options').val().trim();
     750        fieldData.options = ($('#modal-field-options').val() || '').trim();
    751751        fieldData.swatch_mode = $('#modal-field-swatch-mode').val() || 'text';
    752752        break;
    753753    case 'dropdown':
    754754    case 'addons':
    755         fieldData.options = $('#modal-field-options').val().trim();
     755        fieldData.options = ($('#modal-field-options').val() || '').trim();
    756756        break;
    757757    case 'date':
    … …  
    761761        break;
    762762    case 'price_table':
    763         fieldData.options = $('#modal-field-options').val().trim();
     763        fieldData.options = ($('#modal-field-options').val() || '').trim();
    764764        fieldData.table_mode = $('#modal-field-table-mode').val() || 'band';
    765765        break;
    766766    case 'price_matrix':
    767         fieldData.options = $('#modal-field-options').val().trim();
    768         fieldData.matrix_row_label = $('#modal-field-matrix-row-label').val().trim();
    769         fieldData.matrix_col_label = $('#modal-field-matrix-col-label').val().trim();
     767        fieldData.options = ($('#modal-field-options').val() || '').trim();
     768        fieldData.matrix_row_label = ($('#modal-field-matrix-row-label').val() || '').trim();
     769        fieldData.matrix_col_label = ($('#modal-field-matrix-col-label').val() || '').trim();
    770770        break;
    771771    case 'file':
    … …  
    775775    case 'measurement':
    776776        fieldData.measure_mode = $('#modal-field-measure-mode').val() || 'area';
    777         fieldData.unit_label = $('#modal-field-unit-label').val().trim();
     777        fieldData.unit_label = ($('#modal-field-unit-label').val() || '').trim();
    778778        fieldData.measure_waste = $('#modal-field-measure-waste').val() || '0';
    779779        fieldData.measure_round = $('#modal-field-measure-round').val() || '0';
    … …  
    782782}
    783783
    784             fieldData.show_if = $('#modal-field-show-if').val().trim();
     784            fieldData.show_if = ($('#modal-field-show-if').val() || '').trim();
    785785            fieldData.width = $('#modal-field-width').val() || 'full';
    786786
  • pricewise-calculator-pro/trunk/pricewise-calculator-pro.php

    r3672754 r3698814  
    44 * Plugin URI: https://devtonicstudios.com
    55 * Description: WooCommerce price calculator. Customers type a size or quantity and your formula sets the price live, re-checked on the server, into the cart. Premium adds measurement, more field types, and PDF quotes.
    6  * Version: 2.0.2
     6 * Version: 2.0.3
    77 * Author: Devtonic Studios
    88 * Author URI: https://devtonicstudios.com
    … …  
    2626define('PWCP_PLUGIN_DIR', plugin_dir_path(__FILE__));
    2727define('PWCP_PLUGIN_URL', plugin_dir_url(__FILE__));
    28 define('PWCP_PLUGIN_VERSION', '2.0.2');
     28define('PWCP_PLUGIN_VERSION', '2.0.3');
    2929define('PWCP_TEXT_DOMAIN', 'pricewise-calculator-pro');
    3030define('PWCP_PLUGIN_BASENAME', plugin_basename(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.