Plugin Directory

Changeset 3808148


Ignore:
Timestamp:
11/17/2026 09:10:33 PM (less than one hour ago)
Author:
wpcodefactory
Message:

Update to version 5.4.7 from GitHub

Location:
product-quantity-for-woocommerce
Files:
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • product-quantity-for-woocommerce/tags/5.4.7/includes/class-wpfmmsq-core.php

    r3806223 r3808148  
    33 * Product Quantity for WooCommerce - Core Class
    44 *
    5  * @version 5.4.6
     5 * @version 5.4.7
    66 * @version 5.4.2
    77 * @since   1.0.0
    … …  
    22552255                 * set_quantity_input_args.
    22562256                 *
    2257                  * @version 5.4.6
     2257                 * @version 5.4.7
    22582258                 * @since   1.2.0
    22592259                 * @todo    [dev] re-check do we really need to set `step` here?
    … …  
    23222322                                if ( '' !== $args['min_value'] && '' !== $args['max_value'] && (float) $args['max_value'] === (float) $args['min_value'] ) {
    23232323                                        $args['input_value'] = $args['min_value'];
     2324                                }
     2325                        }
     2326
     2327                        if ( is_cart() && isset( $args['min_value'], $args['max_value'] ) ) {
     2328                                if ( '' !== $args['min_value'] && '' !== $args['max_value'] && (float) $args['max_value'] === (float) $args['min_value'] ) {
     2329                                        // Keep the quantity visible on the cart instead of rendering a hidden input.
     2330                                        $args['min_value'] = 0;
     2331                                        $args['readonly']  = true;
    23242332                                }
    23252333                        }
  • product-quantity-for-woocommerce/tags/5.4.7/includes/templates/global/quantity-input.php

    r3806223 r3808148  
    33 * Product quantity inputs // Drop down by WPFactory
    44 *
    5  * @version 5.4.6
     5 * @version 5.4.7
    66 * @since   1.6.0
    77 *
    … …  
    7777
    7878if ( ( $max_value && $min_value === $max_value ) || $readonly ) {
    79         $hidden_qty_value = ( $readonly && '' !== $input_value ? $input_value : $min_value );
    80         ?>
    81         <div class="quantity hidden">
    82                 <input type="hidden" id="<?php echo esc_attr( $input_id ); ?>" class="qty <?php echo esc_attr( $disable_price_by_qty ); ?>"
    83                        name="<?php echo esc_attr( $input_name ); ?>" value="<?php echo esc_attr( $hidden_qty_value ); ?>"/>
    84         </div>
    85         <?php
     79        if ( is_cart() ) {
     80                // The quantity must remain visible on the cart, so render it as a readonly value.
     81                $hidden_qty_value = ( '' !== $input_value ? $input_value : $min_value );
     82                ?>
     83                <div class="quantity">
     84                        <label class="screen-reader-text"
     85                               for="<?php echo esc_attr( $input_id ); ?>"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></label>
     86                        <input
     87                                type="text"
     88                                readonly="readonly"
     89                                id="<?php echo esc_attr( $input_id ); ?>"
     90                                class="qty <?php echo esc_attr( $disable_price_by_qty ); ?>"
     91                                name="<?php echo esc_attr( $input_name ); ?>"
     92                                value="<?php echo esc_attr( $hidden_qty_value ); ?>"
     93                                title="<?php echo esc_attr_x( 'Qty', 'Product quantity input tooltip', 'woocommerce' ); ?>"
     94                                size="4"
     95                        />
     96                </div>
     97                <?php
     98        } else {
     99                $hidden_qty_value = ( $readonly && '' !== $input_value ? $input_value : $min_value );
     100                ?>
     101                <div class="quantity hidden">
     102                        <input type="hidden" id="<?php echo esc_attr( $input_id ); ?>" class="qty <?php echo esc_attr( $disable_price_by_qty ); ?>"
     103                               name="<?php echo esc_attr( $input_name ); ?>" value="<?php echo esc_attr( $hidden_qty_value ); ?>"/>
     104                </div>
     105                <?php
     106        }
    86107} elseif ( ( ( ! empty( $alg_wc_max ) || 0 != ( $max_value_fallback = get_option( 'wpfmmsq_qty_dropdown_max_value_fallback', 0 ) ) ) && ! empty( $step ) && ! $is_dropdown_disable ) || ( ( $productType == 'variable' || $productType == 'variation' ) && ( $variation_max > 0 || ! empty( $variation_exact ) ) && ! $is_dropdown_disable ) ) { // dropdown
    87108        if ( empty( $max_value ) ) {
  • product-quantity-for-woocommerce/tags/5.4.7/langs/product-quantity-for-woocommerce-de_CH_informal.po

    r3806223 r3808148  
    2929msgstr ""
    3030
    31 #: includes/class-wpfmmsq-core.php:3187
     31#: includes/class-wpfmmsq-core.php:3195
    3232msgid "%price% for %qty% pcs."
    3333msgstr ""
    … …  
    879879msgstr ""
    880880
    881 #: includes/class-wpfmmsq-core.php:3185
    882 #: includes/class-wpfmmsq-core.php:3188
     881#: includes/class-wpfmmsq-core.php:3193
     882#: includes/class-wpfmmsq-core.php:3196
    883883#: includes/settings/class-wpfmmsq-settings-price-by-qty.php:132
    884884msgid "%price% for %qty% %unit%."
    … …  
    19031903msgstr ""
    19041904
    1905 #: includes/class-wpfmmsq-core.php:2798
     1905#: includes/class-wpfmmsq-core.php:2806
    19061906msgid "unit"
    19071907msgstr ""
    19081908
    1909 #: includes/class-wpfmmsq-core.php:2799
     1909#: includes/class-wpfmmsq-core.php:2807
    19101910msgid "units"
    19111911msgstr ""
  • product-quantity-for-woocommerce/tags/5.4.7/langs/product-quantity-for-woocommerce-es_ES.po

    r3806223 r3808148  
    4444msgstr "Ver carrito"
    4545
    46 #: includes/class-wpfmmsq-core.php:3185
    47 #: includes/class-wpfmmsq-core.php:3188
     46#: includes/class-wpfmmsq-core.php:3193
     47#: includes/class-wpfmmsq-core.php:3196
    4848#: includes/settings/class-wpfmmsq-settings-price-by-qty.php:132
    4949msgid "%price% for %qty% %unit%."
    … …  
    13241324msgstr "(El marcador de posición %unit% se leerá desde 3 lugares, con el nivel de prioridad definido: primero, leerá si una unidad está definida en el nivel de producto, si no está definida, luego verificará si está definida en el nivel de categoría, si no está definida, se leerá desde el nivel global definido en esta página. Si su tienda usa la misma unidad para todos los productos, puede usar la unidad aquí en el campo sin ningún marcador de posición)"
    13251325
    1326 #: includes/class-wpfmmsq-core.php:3187
     1326#: includes/class-wpfmmsq-core.php:3195
    13271327msgid "%price% for %qty% pcs."
    13281328msgstr "%price% para %qty% uds."
    … …  
    18941894msgstr ""
    18951895
    1896 #: includes/class-wpfmmsq-core.php:2798
     1896#: includes/class-wpfmmsq-core.php:2806
    18971897msgid "unit"
    18981898msgstr ""
    18991899
    1900 #: includes/class-wpfmmsq-core.php:2799
     1900#: includes/class-wpfmmsq-core.php:2807
    19011901msgid "units"
    19021902msgstr ""
  • product-quantity-for-woocommerce/tags/5.4.7/langs/product-quantity-for-woocommerce-fr_FR.po

    r3806223 r3808148  
    2929msgstr ""
    3030
    31 #: includes/class-wpfmmsq-core.php:3187
     31#: includes/class-wpfmmsq-core.php:3195
    3232msgid "%price% for %qty% pcs."
    3333msgstr ""
    … …  
    879879msgstr ""
    880880
    881 #: includes/class-wpfmmsq-core.php:3185
    882 #: includes/class-wpfmmsq-core.php:3188
     881#: includes/class-wpfmmsq-core.php:3193
     882#: includes/class-wpfmmsq-core.php:3196
    883883#: includes/settings/class-wpfmmsq-settings-price-by-qty.php:132
    884884msgid "%price% for %qty% %unit%."
    … …  
    19031903msgstr ""
    19041904
    1905 #: includes/class-wpfmmsq-core.php:2798
     1905#: includes/class-wpfmmsq-core.php:2806
    19061906msgid "unit"
    19071907msgstr ""
    19081908
    1909 #: includes/class-wpfmmsq-core.php:2799
     1909#: includes/class-wpfmmsq-core.php:2807
    19101910msgid "units"
    19111911msgstr ""
  • product-quantity-for-woocommerce/tags/5.4.7/langs/product-quantity-for-woocommerce.pot

    r3806223 r3808148  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: product-quantity-for-woocommerce 5.4.6\n"
     5"Project-Id-Version: product-quantity-for-woocommerce 5.4.7\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/product-quantity-for-woocommerce\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-11-16T23:42:29+01:00\n"
     12"POT-Creation-Date: 2026-11-17T22:00:51+01:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.11.0\n"
    … …  
    8888msgstr ""
    8989
    90 #: includes/class-wpfmmsq-core.php:2798
     90#: includes/class-wpfmmsq-core.php:2806
    9191msgid "unit"
    9292msgstr ""
    9393
    94 #: includes/class-wpfmmsq-core.php:2799
     94#: includes/class-wpfmmsq-core.php:2807
    9595msgid "units"
    9696msgstr ""
    9797
    98 #: includes/class-wpfmmsq-core.php:3185
    99 #: includes/class-wpfmmsq-core.php:3188
     98#: includes/class-wpfmmsq-core.php:3193
     99#: includes/class-wpfmmsq-core.php:3196
    100100#: includes/settings/class-wpfmmsq-settings-price-by-qty.php:132
    101101msgid "%price% for %qty% %unit%."
    102102msgstr ""
    103103
    104 #: includes/class-wpfmmsq-core.php:3187
     104#: includes/class-wpfmmsq-core.php:3195
    105105msgid "%price% for %qty% pcs."
    106106msgstr ""
  • product-quantity-for-woocommerce/tags/5.4.7/product-quantity-for-woocommerce.php

    r3806223 r3808148  
    44Plugin URI: https://wpfactory.com/item/product-quantity-for-woocommerce/
    55Description: Manage product quantity in WooCommerce, beautifully. Define a minimum / maximum / step quantity and more on WooCommerce products.
    6 Version: 5.4.6
     6Version: 5.4.7
    77Author: WPFactory
    88Author URI: https://wpfactory.com
    … …  
    100100                 * @var   string
    101101                 */
    102                 public $version = '5.4.6';
     102                public $version = '5.4.7';
    103103
    104104                /**
  • product-quantity-for-woocommerce/tags/5.4.7/readme.txt

    r3806223 r3808148  
    44Requires at least: 6.1
    55Tested up to: 7.1
    6 Stable tag: 5.4.6
     6Stable tag: 5.4.7
    77License: GNU General Public License v3.0
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
    … …  
    345345
    346346== Changelog ==
     347
     348= 5.4.7 - 17/11/2026 =
     349* Fix - Min Quantity - Fixed quantity not being displayed on cart page when minimum quantity matches stock (or maximum) quantity.
    347350
    348351= 5.4.6 - 16/11/2026 =
  • product-quantity-for-woocommerce/trunk/includes/class-wpfmmsq-core.php

    r3806223 r3808148  
    33 * Product Quantity for WooCommerce - Core Class
    44 *
    5  * @version 5.4.6
     5 * @version 5.4.7
    66 * @version 5.4.2
    77 * @since   1.0.0
    … …  
    22552255                 * set_quantity_input_args.
    22562256                 *
    2257                  * @version 5.4.6
     2257                 * @version 5.4.7
    22582258                 * @since   1.2.0
    22592259                 * @todo    [dev] re-check do we really need to set `step` here?
    … …  
    23222322                                if ( '' !== $args['min_value'] && '' !== $args['max_value'] && (float) $args['max_value'] === (float) $args['min_value'] ) {
    23232323                                        $args['input_value'] = $args['min_value'];
     2324                                }
     2325                        }
     2326
     2327                        if ( is_cart() && isset( $args['min_value'], $args['max_value'] ) ) {
     2328                                if ( '' !== $args['min_value'] && '' !== $args['max_value'] && (float) $args['max_value'] === (float) $args['min_value'] ) {
     2329                                        // Keep the quantity visible on the cart instead of rendering a hidden input.
     2330                                        $args['min_value'] = 0;
     2331                                        $args['readonly']  = true;
    23242332                                }
    23252333                        }
  • product-quantity-for-woocommerce/trunk/includes/templates/global/quantity-input.php

    r3806223 r3808148  
    33 * Product quantity inputs // Drop down by WPFactory
    44 *
    5  * @version 5.4.6
     5 * @version 5.4.7
    66 * @since   1.6.0
    77 *
    … …  
    7777
    7878if ( ( $max_value && $min_value === $max_value ) || $readonly ) {
    79         $hidden_qty_value = ( $readonly && '' !== $input_value ? $input_value : $min_value );
    80         ?>
    81         <div class="quantity hidden">
    82                 <input type="hidden" id="<?php echo esc_attr( $input_id ); ?>" class="qty <?php echo esc_attr( $disable_price_by_qty ); ?>"
    83                        name="<?php echo esc_attr( $input_name ); ?>" value="<?php echo esc_attr( $hidden_qty_value ); ?>"/>
    84         </div>
    85         <?php
     79        if ( is_cart() ) {
     80                // The quantity must remain visible on the cart, so render it as a readonly value.
     81                $hidden_qty_value = ( '' !== $input_value ? $input_value : $min_value );
     82                ?>
     83                <div class="quantity">
     84                        <label class="screen-reader-text"
     85                               for="<?php echo esc_attr( $input_id ); ?>"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></label>
     86                        <input
     87                                type="text"
     88                                readonly="readonly"
     89                                id="<?php echo esc_attr( $input_id ); ?>"
     90                                class="qty <?php echo esc_attr( $disable_price_by_qty ); ?>"
     91                                name="<?php echo esc_attr( $input_name ); ?>"
     92                                value="<?php echo esc_attr( $hidden_qty_value ); ?>"
     93                                title="<?php echo esc_attr_x( 'Qty', 'Product quantity input tooltip', 'woocommerce' ); ?>"
     94                                size="4"
     95                        />
     96                </div>
     97                <?php
     98        } else {
     99                $hidden_qty_value = ( $readonly && '' !== $input_value ? $input_value : $min_value );
     100                ?>
     101                <div class="quantity hidden">
     102                        <input type="hidden" id="<?php echo esc_attr( $input_id ); ?>" class="qty <?php echo esc_attr( $disable_price_by_qty ); ?>"
     103                               name="<?php echo esc_attr( $input_name ); ?>" value="<?php echo esc_attr( $hidden_qty_value ); ?>"/>
     104                </div>
     105                <?php
     106        }
    86107} elseif ( ( ( ! empty( $alg_wc_max ) || 0 != ( $max_value_fallback = get_option( 'wpfmmsq_qty_dropdown_max_value_fallback', 0 ) ) ) && ! empty( $step ) && ! $is_dropdown_disable ) || ( ( $productType == 'variable' || $productType == 'variation' ) && ( $variation_max > 0 || ! empty( $variation_exact ) ) && ! $is_dropdown_disable ) ) { // dropdown
    87108        if ( empty( $max_value ) ) {
  • product-quantity-for-woocommerce/trunk/langs/product-quantity-for-woocommerce-de_CH_informal.po

    r3806223 r3808148  
    2929msgstr ""
    3030
    31 #: includes/class-wpfmmsq-core.php:3187
     31#: includes/class-wpfmmsq-core.php:3195
    3232msgid "%price% for %qty% pcs."
    3333msgstr ""
    … …  
    879879msgstr ""
    880880
    881 #: includes/class-wpfmmsq-core.php:3185
    882 #: includes/class-wpfmmsq-core.php:3188
     881#: includes/class-wpfmmsq-core.php:3193
     882#: includes/class-wpfmmsq-core.php:3196
    883883#: includes/settings/class-wpfmmsq-settings-price-by-qty.php:132
    884884msgid "%price% for %qty% %unit%."
    … …  
    19031903msgstr ""
    19041904
    1905 #: includes/class-wpfmmsq-core.php:2798
     1905#: includes/class-wpfmmsq-core.php:2806
    19061906msgid "unit"
    19071907msgstr ""
    19081908
    1909 #: includes/class-wpfmmsq-core.php:2799
     1909#: includes/class-wpfmmsq-core.php:2807
    19101910msgid "units"
    19111911msgstr ""
  • product-quantity-for-woocommerce/trunk/langs/product-quantity-for-woocommerce-es_ES.po

    r3806223 r3808148  
    4444msgstr "Ver carrito"
    4545
    46 #: includes/class-wpfmmsq-core.php:3185
    47 #: includes/class-wpfmmsq-core.php:3188
     46#: includes/class-wpfmmsq-core.php:3193
     47#: includes/class-wpfmmsq-core.php:3196
    4848#: includes/settings/class-wpfmmsq-settings-price-by-qty.php:132
    4949msgid "%price% for %qty% %unit%."
    … …  
    13241324msgstr "(El marcador de posición %unit% se leerá desde 3 lugares, con el nivel de prioridad definido: primero, leerá si una unidad está definida en el nivel de producto, si no está definida, luego verificará si está definida en el nivel de categoría, si no está definida, se leerá desde el nivel global definido en esta página. Si su tienda usa la misma unidad para todos los productos, puede usar la unidad aquí en el campo sin ningún marcador de posición)"
    13251325
    1326 #: includes/class-wpfmmsq-core.php:3187
     1326#: includes/class-wpfmmsq-core.php:3195
    13271327msgid "%price% for %qty% pcs."
    13281328msgstr "%price% para %qty% uds."
    … …  
    18941894msgstr ""
    18951895
    1896 #: includes/class-wpfmmsq-core.php:2798
     1896#: includes/class-wpfmmsq-core.php:2806
    18971897msgid "unit"
    18981898msgstr ""
    18991899
    1900 #: includes/class-wpfmmsq-core.php:2799
     1900#: includes/class-wpfmmsq-core.php:2807
    19011901msgid "units"
    19021902msgstr ""
  • product-quantity-for-woocommerce/trunk/langs/product-quantity-for-woocommerce-fr_FR.po

    r3806223 r3808148  
    2929msgstr ""
    3030
    31 #: includes/class-wpfmmsq-core.php:3187
     31#: includes/class-wpfmmsq-core.php:3195
    3232msgid "%price% for %qty% pcs."
    3333msgstr ""
    … …  
    879879msgstr ""
    880880
    881 #: includes/class-wpfmmsq-core.php:3185
    882 #: includes/class-wpfmmsq-core.php:3188
     881#: includes/class-wpfmmsq-core.php:3193
     882#: includes/class-wpfmmsq-core.php:3196
    883883#: includes/settings/class-wpfmmsq-settings-price-by-qty.php:132
    884884msgid "%price% for %qty% %unit%."
    … …  
    19031903msgstr ""
    19041904
    1905 #: includes/class-wpfmmsq-core.php:2798
     1905#: includes/class-wpfmmsq-core.php:2806
    19061906msgid "unit"
    19071907msgstr ""
    19081908
    1909 #: includes/class-wpfmmsq-core.php:2799
     1909#: includes/class-wpfmmsq-core.php:2807
    19101910msgid "units"
    19111911msgstr ""
  • product-quantity-for-woocommerce/trunk/langs/product-quantity-for-woocommerce.pot

    r3806223 r3808148  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: product-quantity-for-woocommerce 5.4.6\n"
     5"Project-Id-Version: product-quantity-for-woocommerce 5.4.7\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/product-quantity-for-woocommerce\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-11-16T23:42:29+01:00\n"
     12"POT-Creation-Date: 2026-11-17T22:00:51+01:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.11.0\n"
    … …  
    8888msgstr ""
    8989
    90 #: includes/class-wpfmmsq-core.php:2798
     90#: includes/class-wpfmmsq-core.php:2806
    9191msgid "unit"
    9292msgstr ""
    9393
    94 #: includes/class-wpfmmsq-core.php:2799
     94#: includes/class-wpfmmsq-core.php:2807
    9595msgid "units"
    9696msgstr ""
    9797
    98 #: includes/class-wpfmmsq-core.php:3185
    99 #: includes/class-wpfmmsq-core.php:3188
     98#: includes/class-wpfmmsq-core.php:3193
     99#: includes/class-wpfmmsq-core.php:3196
    100100#: includes/settings/class-wpfmmsq-settings-price-by-qty.php:132
    101101msgid "%price% for %qty% %unit%."
    102102msgstr ""
    103103
    104 #: includes/class-wpfmmsq-core.php:3187
     104#: includes/class-wpfmmsq-core.php:3195
    105105msgid "%price% for %qty% pcs."
    106106msgstr ""
  • product-quantity-for-woocommerce/trunk/product-quantity-for-woocommerce.php

    r3806223 r3808148  
    44Plugin URI: https://wpfactory.com/item/product-quantity-for-woocommerce/
    55Description: Manage product quantity in WooCommerce, beautifully. Define a minimum / maximum / step quantity and more on WooCommerce products.
    6 Version: 5.4.6
     6Version: 5.4.7
    77Author: WPFactory
    88Author URI: https://wpfactory.com
    … …  
    100100                 * @var   string
    101101                 */
    102                 public $version = '5.4.6';
     102                public $version = '5.4.7';
    103103
    104104                /**
  • product-quantity-for-woocommerce/trunk/readme.txt

    r3806223 r3808148  
    44Requires at least: 6.1
    55Tested up to: 7.1
    6 Stable tag: 5.4.6
     6Stable tag: 5.4.7
    77License: GNU General Public License v3.0
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
    … …  
    345345
    346346== Changelog ==
     347
     348= 5.4.7 - 17/11/2026 =
     349* Fix - Min Quantity - Fixed quantity not being displayed on cart page when minimum quantity matches stock (or maximum) quantity.
    347350
    348351= 5.4.6 - 16/11/2026 =
Note: See TracChangeset for help on using the changeset viewer.