Plugin Directory

Changeset 2940972


Ignore:
Timestamp:
07/20/2023 04:27:05 PM (2 years ago)
Author:
orderable
Message:

Update to version 1.8.4 from GitHub

Location:
orderable
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • orderable/tags/1.8.4/docs/actions.json

    r2933929 r2940972  
    392392            "doc": {
    393393                "description": "Plugin Name: Orderable - Local Ordering System Author URI: https://orderable.com Description: Take local online ordering to a whole new level with Orderable.",
    394                 "long_description": "Version: 1.8.2 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 7.7",
    395                 "tags": [],
    396                 "long_description_html": "<p>Version: 1.8.2 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 7.7</p>"
     394                "long_description": "Version: 1.8.3 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 7.8",
     395                "tags": [],
     396                "long_description_html": "<p>Version: 1.8.3 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 7.8</p>"
    397397            },
    398398            "args": 0
  • orderable/tags/1.8.4/inc/modules/location/admin/class-location-admin.php

    r2933929 r2940972  
    312312         */
    313313        do_action( 'orderable_location_save_data', $data );
     314
     315        self::clear_location_data_cache( $data );
     316    }
     317
     318    /**
     319     * Clear location cache when updated.
     320     *
     321     * @param array $data The data saved.
     322     * @return void
     323     */
     324    protected static function clear_location_data_cache( $data ) {
     325        global $post;
     326
     327        $post_id     = ! empty( $post ) ? $post->ID : null;
     328        $location_id = Orderable_Location::get_location_id( $post_id );
     329
     330        if ( empty( $location_id ) ) {
     331            return;
     332        }
     333
     334        $location_data_cache_key = 'orderable_get_location_data_' . $location_id;
     335        $time_slots_cache_key    = 'orderable_time_slots_' . $location_id;
     336
     337        wp_cache_delete( $location_data_cache_key );
     338        wp_cache_delete( $time_slots_cache_key . '_delivery' );
     339        wp_cache_delete( $time_slots_cache_key . '_pickup' );
     340        wp_cache_delete( 'orderable_zones' );
     341
     342        foreach ( WC_Shipping_Zones::get_zones() as $zone ) {
     343            wp_cache_delete( 'orderable_time_slots_for_zone_' . $zone['zone_id'] );
     344        }
     345
     346        if ( empty( $data['store_general_service_hours_delivery'] ) || ! is_array( $data['store_general_service_hours_delivery'] ) ) {
     347            return;
     348        }
     349
     350        foreach ( $data['store_general_service_hours_delivery'] as $time_slot ) {
     351            if ( empty( $time_slot['time_slot_id'] ) ) {
     352                continue;
     353            }
     354
     355            wp_cache_delete( 'orderable_zones_time_slot_' . $time_slot['time_slot_id'] );
     356        }
    314357    }
    315358
  • orderable/tags/1.8.4/inc/modules/location/zones/class-location-zones.php

    r2913809 r2940972  
    255255     * Get the selected shipping zone ID.
    256256     *
    257      * @return int|bool
     257     * @return int|false
    258258     */
    259259    public static function get_selected_shipping_zone_id() {
    260         return ! empty( WC()->session ) ? WC()->session->get( 'orderable_chosen_zone_id' ) : false;
     260        return ! empty( WC()->session ) ? WC()->session->get( 'orderable_chosen_zone_id', false ) : false;
    261261    }
    262262
  • orderable/tags/1.8.4/languages/orderable.pot

    r2933929 r2940972  
    77"Content-Type: text/plain; charset=UTF-8\n"
    88"Content-Transfer-Encoding: 8bit\n"
    9 "POT-Creation-Date: 2023-05-23 07:25+0000\n"
     9"POT-Creation-Date: 2023-07-04 11:53+0000\n"
    1010"X-Poedit-Basepath: ..\n"
    1111"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
     
    623623msgstr ""
    624624
    625 #: inc/modules/location/class-location-single.php:459
     625#: inc/modules/location/class-location-single.php:469
    626626msgid "Closed"
    627627msgstr ""
    628628
    629 #: inc/modules/location/class-location-single.php:465
     629#: inc/modules/location/class-location-single.php:475
    630630msgid "Holiday"
    631631msgstr ""
    632632
    633 #: inc/modules/location/class-location-single.php:527, inc/modules/location/admin/meta-boxes/class-location-store-services-meta-box.php:490
     633#: inc/modules/location/class-location-single.php:537, inc/modules/location/admin/meta-boxes/class-location-store-services-meta-box.php:490
    634634msgid "All Day"
    635635msgstr ""
     
    909909msgstr ""
    910910
    911 #: inc/modules/location/admin/class-location-admin.php:171, inc/modules/location/admin/class-location-admin.php:172, inc/modules/location/admin/class-location-admin.php:190
     911#: inc/modules/location/admin/class-location-admin.php:178, inc/modules/location/admin/class-location-admin.php:179, inc/modules/location/admin/class-location-admin.php:197
    912912msgid "Location"
    913913msgstr ""
    914914
    915 #: inc/modules/location/admin/class-location-admin.php:185
     915#: inc/modules/location/admin/class-location-admin.php:192
    916916msgid "You do not have sufficient permissions to access this page."
    917917msgstr ""
    918918
    919 #: inc/modules/location/admin/class-location-admin.php:207
     919#: inc/modules/location/admin/class-location-admin.php:214
    920920msgid "Save Changes"
    921921msgstr ""
    922922
    923 #: inc/modules/location/admin/class-location-admin.php:212
     923#: inc/modules/location/admin/class-location-admin.php:219
    924924msgid "Unlock Multi-Location Power with Orderable Pro"
    925925msgstr ""
    926926
    927 #: inc/modules/location/admin/class-location-admin.php:213
     927#: inc/modules/location/admin/class-location-admin.php:220
    928928msgid "Manage multiple locations effortlessly with Orderable Pro, perfect for businesses with more than one location. Take control of your delivery and pickup services like never before."
    929929msgstr ""
    930930
    931 #: inc/modules/location/admin/class-location-admin.php:214
     931#: inc/modules/location/admin/class-location-admin.php:221
    932932msgid "Upgrade Now"
    933933msgstr ""
    934934
    935 #: inc/modules/location/admin/class-location-admin.php:215
     935#: inc/modules/location/admin/class-location-admin.php:222
    936936msgid "or"
    937937msgstr ""
    938938
    939 #: inc/modules/location/admin/class-location-admin.php:215
     939#: inc/modules/location/admin/class-location-admin.php:222
    940940msgid "learn more"
    941941msgstr ""
  • orderable/tags/1.8.4/orderable.php

    r2933929 r2940972  
    44 * Author URI: https://orderable.com
    55 * Description: Take local online ordering to a whole new level with Orderable.
    6  * Version: 1.8.3
     6 * Version: 1.8.4
    77 * Author: Orderable
    88 * Text Domain: orderable
    99 * WC requires at least: 5.4.0
    10  * WC tested up to: 7.8
     10 * WC tested up to: 7.9
    1111 */
    1212
     
    2020     * @var string Plugin version.
    2121     */
    22     public static $version = '1.8.3';
     22    public static $version = '1.8.4';
    2323
    2424    /**
  • orderable/tags/1.8.4/readme.txt

    r2933929 r2940972  
    55Tested up to: 6.2
    66Requires PHP: 5.6
    7 Stable tag: 1.8.3
     7Stable tag: 1.8.4
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    145145
    146146== Changelog ==
     147**v1.8.4** (20 Jul 2023)
     148[fix] Location data not getting updated when cache is activated 
     149[fix] Compatibility issue with WooCommerce Payment Gateway Based Fees 
     150
    147151**v1.8.3** (04 Jul 2023)
    148152[new] Filter `orderable_location_get_lead_time` 
  • orderable/trunk/docs/actions.json

    r2933929 r2940972  
    392392            "doc": {
    393393                "description": "Plugin Name: Orderable - Local Ordering System Author URI: https://orderable.com Description: Take local online ordering to a whole new level with Orderable.",
    394                 "long_description": "Version: 1.8.2 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 7.7",
    395                 "tags": [],
    396                 "long_description_html": "<p>Version: 1.8.2 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 7.7</p>"
     394                "long_description": "Version: 1.8.3 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 7.8",
     395                "tags": [],
     396                "long_description_html": "<p>Version: 1.8.3 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 7.8</p>"
    397397            },
    398398            "args": 0
  • orderable/trunk/inc/modules/location/admin/class-location-admin.php

    r2933929 r2940972  
    312312         */
    313313        do_action( 'orderable_location_save_data', $data );
     314
     315        self::clear_location_data_cache( $data );
     316    }
     317
     318    /**
     319     * Clear location cache when updated.
     320     *
     321     * @param array $data The data saved.
     322     * @return void
     323     */
     324    protected static function clear_location_data_cache( $data ) {
     325        global $post;
     326
     327        $post_id     = ! empty( $post ) ? $post->ID : null;
     328        $location_id = Orderable_Location::get_location_id( $post_id );
     329
     330        if ( empty( $location_id ) ) {
     331            return;
     332        }
     333
     334        $location_data_cache_key = 'orderable_get_location_data_' . $location_id;
     335        $time_slots_cache_key    = 'orderable_time_slots_' . $location_id;
     336
     337        wp_cache_delete( $location_data_cache_key );
     338        wp_cache_delete( $time_slots_cache_key . '_delivery' );
     339        wp_cache_delete( $time_slots_cache_key . '_pickup' );
     340        wp_cache_delete( 'orderable_zones' );
     341
     342        foreach ( WC_Shipping_Zones::get_zones() as $zone ) {
     343            wp_cache_delete( 'orderable_time_slots_for_zone_' . $zone['zone_id'] );
     344        }
     345
     346        if ( empty( $data['store_general_service_hours_delivery'] ) || ! is_array( $data['store_general_service_hours_delivery'] ) ) {
     347            return;
     348        }
     349
     350        foreach ( $data['store_general_service_hours_delivery'] as $time_slot ) {
     351            if ( empty( $time_slot['time_slot_id'] ) ) {
     352                continue;
     353            }
     354
     355            wp_cache_delete( 'orderable_zones_time_slot_' . $time_slot['time_slot_id'] );
     356        }
    314357    }
    315358
  • orderable/trunk/inc/modules/location/zones/class-location-zones.php

    r2913809 r2940972  
    255255     * Get the selected shipping zone ID.
    256256     *
    257      * @return int|bool
     257     * @return int|false
    258258     */
    259259    public static function get_selected_shipping_zone_id() {
    260         return ! empty( WC()->session ) ? WC()->session->get( 'orderable_chosen_zone_id' ) : false;
     260        return ! empty( WC()->session ) ? WC()->session->get( 'orderable_chosen_zone_id', false ) : false;
    261261    }
    262262
  • orderable/trunk/languages/orderable.pot

    r2933929 r2940972  
    77"Content-Type: text/plain; charset=UTF-8\n"
    88"Content-Transfer-Encoding: 8bit\n"
    9 "POT-Creation-Date: 2023-05-23 07:25+0000\n"
     9"POT-Creation-Date: 2023-07-04 11:53+0000\n"
    1010"X-Poedit-Basepath: ..\n"
    1111"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
     
    623623msgstr ""
    624624
    625 #: inc/modules/location/class-location-single.php:459
     625#: inc/modules/location/class-location-single.php:469
    626626msgid "Closed"
    627627msgstr ""
    628628
    629 #: inc/modules/location/class-location-single.php:465
     629#: inc/modules/location/class-location-single.php:475
    630630msgid "Holiday"
    631631msgstr ""
    632632
    633 #: inc/modules/location/class-location-single.php:527, inc/modules/location/admin/meta-boxes/class-location-store-services-meta-box.php:490
     633#: inc/modules/location/class-location-single.php:537, inc/modules/location/admin/meta-boxes/class-location-store-services-meta-box.php:490
    634634msgid "All Day"
    635635msgstr ""
     
    909909msgstr ""
    910910
    911 #: inc/modules/location/admin/class-location-admin.php:171, inc/modules/location/admin/class-location-admin.php:172, inc/modules/location/admin/class-location-admin.php:190
     911#: inc/modules/location/admin/class-location-admin.php:178, inc/modules/location/admin/class-location-admin.php:179, inc/modules/location/admin/class-location-admin.php:197
    912912msgid "Location"
    913913msgstr ""
    914914
    915 #: inc/modules/location/admin/class-location-admin.php:185
     915#: inc/modules/location/admin/class-location-admin.php:192
    916916msgid "You do not have sufficient permissions to access this page."
    917917msgstr ""
    918918
    919 #: inc/modules/location/admin/class-location-admin.php:207
     919#: inc/modules/location/admin/class-location-admin.php:214
    920920msgid "Save Changes"
    921921msgstr ""
    922922
    923 #: inc/modules/location/admin/class-location-admin.php:212
     923#: inc/modules/location/admin/class-location-admin.php:219
    924924msgid "Unlock Multi-Location Power with Orderable Pro"
    925925msgstr ""
    926926
    927 #: inc/modules/location/admin/class-location-admin.php:213
     927#: inc/modules/location/admin/class-location-admin.php:220
    928928msgid "Manage multiple locations effortlessly with Orderable Pro, perfect for businesses with more than one location. Take control of your delivery and pickup services like never before."
    929929msgstr ""
    930930
    931 #: inc/modules/location/admin/class-location-admin.php:214
     931#: inc/modules/location/admin/class-location-admin.php:221
    932932msgid "Upgrade Now"
    933933msgstr ""
    934934
    935 #: inc/modules/location/admin/class-location-admin.php:215
     935#: inc/modules/location/admin/class-location-admin.php:222
    936936msgid "or"
    937937msgstr ""
    938938
    939 #: inc/modules/location/admin/class-location-admin.php:215
     939#: inc/modules/location/admin/class-location-admin.php:222
    940940msgid "learn more"
    941941msgstr ""
  • orderable/trunk/orderable.php

    r2933929 r2940972  
    44 * Author URI: https://orderable.com
    55 * Description: Take local online ordering to a whole new level with Orderable.
    6  * Version: 1.8.3
     6 * Version: 1.8.4
    77 * Author: Orderable
    88 * Text Domain: orderable
    99 * WC requires at least: 5.4.0
    10  * WC tested up to: 7.8
     10 * WC tested up to: 7.9
    1111 */
    1212
     
    2020     * @var string Plugin version.
    2121     */
    22     public static $version = '1.8.3';
     22    public static $version = '1.8.4';
    2323
    2424    /**
  • orderable/trunk/readme.txt

    r2933929 r2940972  
    55Tested up to: 6.2
    66Requires PHP: 5.6
    7 Stable tag: 1.8.3
     7Stable tag: 1.8.4
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    145145
    146146== Changelog ==
     147**v1.8.4** (20 Jul 2023)
     148[fix] Location data not getting updated when cache is activated 
     149[fix] Compatibility issue with WooCommerce Payment Gateway Based Fees 
     150
    147151**v1.8.3** (04 Jul 2023)
    148152[new] Filter `orderable_location_get_lead_time` 
Note: See TracChangeset for help on using the changeset viewer.