Plugin Directory

Changeset 3349755


Ignore:
Timestamp:
08/25/2025 02:03:25 PM (6 months ago)
Author:
tlloancy
Message:

added a no temperature selected state into selectors

Location:
simple-connection-for-chronofresh-woocommerce
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • simple-connection-for-chronofresh-woocommerce/tags/1.0.3/includes/class-sccfcw-chronofresh-admin.php

    r3348449 r3349755  
    288288            'desc_tip' => true,
    289289            'options' => [
     290                'none' => esc_html__('Pas de température', 'simple-connection-for-chronofresh-woocommerce'),
    290291                'ambient' => esc_html__('Ambient', 'simple-connection-for-chronofresh-woocommerce'),
    291292                'fresh' => esc_html__('Fresh', 'simple-connection-for-chronofresh-woocommerce'),
     
    296297    }
    297298    public function save_temperature_field($post_id) {
    298         if (isset($_POST['_temperature_type']) && in_array($_POST['_temperature_type'], ['ambient', 'fresh', 'freeze'])) {
     299        if (isset($_POST['_temperature_type']) && in_array($_POST['_temperature_type'], ['none', 'ambient', 'fresh', 'freeze'])) {
    299300            update_post_meta($post_id, '_temperature_type', sanitize_text_field($_POST['_temperature_type']));
    300301        }
  • simple-connection-for-chronofresh-woocommerce/tags/1.0.3/includes/class-sccfcw-chronofresh-api.php

    r3348449 r3349755  
    282282            }
    283283            $temp = sanitize_text_field($product->get_meta('_temperature_type', true)) ?: 'ambient';
     284            if ($temp === 'none') {
     285                $temp = 'ambient';
     286            }
    284287            $groups[$temp][] = $item;
    285288        }
  • simple-connection-for-chronofresh-woocommerce/tags/1.0.3/readme.txt

    r3348449 r3349755  
    55Requires at least: 5.8
    66Tested up to: 6.8
    7 Stable tag: 1.0.2
     7Stable tag: 1.0.3
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    4747== Changelog ==
    4848
     49= 1.0.3 =
     50Released on August 25, 2025:
     51* Added: Explicit select when no temperature is defined, which default to ambient for label generation, avoiding any unrecognized state for products linked to chronofresh via Expedition Class.
     52
    4953= 1.0.2 =
    5054Released on August 22, 2025:
  • simple-connection-for-chronofresh-woocommerce/tags/1.0.3/simple-connection-for-chronofresh-woocommerce.php

    r3348449 r3349755  
    33Plugin Name: Simple Connection for ChronoFresh
    44Description: Intégration Chronopost pour WooCommerce (Ambient, Fresh, Freeze, Relais)
    5 Version: 1.0.2
     5Version: 1.0.3
    66Author: tlloancy
    77License: GPL-2.0+
  • simple-connection-for-chronofresh-woocommerce/trunk/includes/class-sccfcw-chronofresh-admin.php

    r3348449 r3349755  
    288288            'desc_tip' => true,
    289289            'options' => [
     290                'none' => esc_html__('Pas de température', 'simple-connection-for-chronofresh-woocommerce'),
    290291                'ambient' => esc_html__('Ambient', 'simple-connection-for-chronofresh-woocommerce'),
    291292                'fresh' => esc_html__('Fresh', 'simple-connection-for-chronofresh-woocommerce'),
     
    296297    }
    297298    public function save_temperature_field($post_id) {
    298         if (isset($_POST['_temperature_type']) && in_array($_POST['_temperature_type'], ['ambient', 'fresh', 'freeze'])) {
     299        if (isset($_POST['_temperature_type']) && in_array($_POST['_temperature_type'], ['none', 'ambient', 'fresh', 'freeze'])) {
    299300            update_post_meta($post_id, '_temperature_type', sanitize_text_field($_POST['_temperature_type']));
    300301        }
  • simple-connection-for-chronofresh-woocommerce/trunk/includes/class-sccfcw-chronofresh-api.php

    r3348449 r3349755  
    282282            }
    283283            $temp = sanitize_text_field($product->get_meta('_temperature_type', true)) ?: 'ambient';
     284            if ($temp === 'none') {
     285                $temp = 'ambient';
     286            }
    284287            $groups[$temp][] = $item;
    285288        }
  • simple-connection-for-chronofresh-woocommerce/trunk/readme.txt

    r3348449 r3349755  
    55Requires at least: 5.8
    66Tested up to: 6.8
    7 Stable tag: 1.0.2
     7Stable tag: 1.0.3
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    4747== Changelog ==
    4848
     49= 1.0.3 =
     50Released on August 25, 2025:
     51* Added: Explicit select when no temperature is defined, which default to ambient for label generation, avoiding any unrecognized state for products linked to chronofresh via Expedition Class.
     52
    4953= 1.0.2 =
    5054Released on August 22, 2025:
  • simple-connection-for-chronofresh-woocommerce/trunk/simple-connection-for-chronofresh-woocommerce.php

    r3348449 r3349755  
    33Plugin Name: Simple Connection for ChronoFresh
    44Description: Intégration Chronopost pour WooCommerce (Ambient, Fresh, Freeze, Relais)
    5 Version: 1.0.2
     5Version: 1.0.3
    66Author: tlloancy
    77License: GPL-2.0+
Note: See TracChangeset for help on using the changeset viewer.