Plugin Directory

Changeset 3134021


Ignore:
Timestamp:
08/12/2024 08:44:13 AM (20 months ago)
Author:
epaka
Message:

version 1.1.4

Location:
epaka-pl
Files:
273 added
2 edited

Legend:

Unmodified
Added
Removed
  • epaka-pl/trunk/README.txt

    r3127425 r3134021  
    55Requires at least: 6.0
    66Tested up to: 6.5.5
    7 Stable tag: 1.1.3
     7Stable tag: 1.1.4
    88Requires PHP: 5.6
    99License: GPLv2 or later
     
    9090= 1.1.3 =
    9191* Fixed redirect after login
     92= 1.1.4 =
     93* Fixed version check for scheduled task
    9294
    9395
  • epaka-pl/trunk/epakapl.php

    r3127425 r3134021  
    1111 * Plugin URI:           https://www.epaka.pl
    1212 * Description:          Integracja Woocommerce z epaka.pl. Składanie zamówień, generowanie etykiet, tracking przesyłek, mapa puntów odbioru dla klientów sklepu oraz o wiele więcej przydatnych funkcji dostępnych pod ręką.
    13  * Version:              1.1.3
     13 * Version:              1.1.4
    1414 * Author:               epaka.pl
    1515 * Author URI:           https://www.epaka.pl
     
    5858     * Rename this for your plugin and update it as you release new versions.
    5959     */
    60     define( 'EPAKA_VERSION', '1.1.3' );
     60    define( 'EPAKA_VERSION', '1.1.4' );
    6161    define( 'EPAKA_DOMAIN', 'https://www.epaka.pl/' );
    6262    define( 'EPAKA_PATH', dirname(__FILE__) );
     
    7070        $db_plugin_version = get_option('epaka_plugin_version');
    7171
     72
     73
    7274        if (empty($db_plugin_version) || version_compare($installed_plugin_version, $db_plugin_version, '>')) {
    73             switch ($installed_plugin_version) {
    74                 case '1.1.0':
    75                     if(function_exists('as_has_scheduled_action')) {
    76                         if (false === as_has_scheduled_action('epaka_update_order_metadata')) {
    77                             as_schedule_single_action(time() + 60, 'epaka_update_order_metadata');
    78                         }
    79                     }else{
    80                         if (false === as_next_scheduled_action('epaka_update_order_metadata')) {
    81                             as_schedule_single_action(time() + 60, 'epaka_update_order_metadata');
    82                         }
     75            if(get_option('epaka_updated_metadata') !== "1"){
     76                if(function_exists('as_has_scheduled_action')) {
     77                    if (false === as_has_scheduled_action('epaka_update_order_metadata')) {
     78                        as_schedule_single_action(time() + 60, 'epaka_update_order_metadata');
    8379                    }
    84                     break;
    85             }
     80                }else{
     81                    if (false === as_next_scheduled_action('epaka_update_order_metadata')) {
     82                        as_schedule_single_action(time() + 60, 'epaka_update_order_metadata');
     83                    }
     84                }
     85            }
     86//            switch ($installed_plugin_version) {
     87//                case '1.1.0':
     88////                    if(function_exists('as_has_scheduled_action')) {
     89////                        if (false === as_has_scheduled_action('epaka_update_order_metadata')) {
     90////                            as_schedule_single_action(time() + 60, 'epaka_update_order_metadata');
     91////                        }
     92////                    }else{
     93////                        if (false === as_next_scheduled_action('epaka_update_order_metadata')) {
     94////                            as_schedule_single_action(time() + 60, 'epaka_update_order_metadata');
     95////                        }
     96////                    }
     97//                    break;
     98//            }
    8699            update_option('epaka_plugin_version',$installed_plugin_version);
    87100        }
     
    89102
    90103    function updateOrderMetadata(){
     104        add_option('epaka_updated_metadata','1');
    91105        $args = ['date_before' => date('Y-m-d',strtotime(date('Y-m-d').' +1day')), 'limit' => -1];
    92106        $orders = wc_get_orders($args);
Note: See TracChangeset for help on using the changeset viewer.