Plugin Directory

Changeset 2875990

Timestamp:
03/07/2023 03:05:11 PM (17 months ago)
Author:
khorshidlab
Message:

Plugin Version 1.3.2

Location:
podro-wp
Files:
8 added
30 edited
1 copied

Legend:

Unmodified
Added
Removed
  • podro-wp/tags/1.3.2/README.txt

    r2870927 r2875990  
    55Tested up to: 6.1
    66Requires PHP: 7.2
    7 Stable tag: 1.3.1
     7Stable tag: 1.3.
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5858
    5959== Changelog ==
     60
     61
     62
    6063
    6164= 1.3.1 - 2013-02-25 =
  • podro-wp/tags/1.3.2/admin/views/pages/api-key-settings.php

    r2870927 r2875990  
    9494                            <td>
    9595                                <?php
    96                                     $provinces = \WP_PODRO\Engine\WooSetting::get_provinces();
    97                                     echo "<select  id='podro_store_city' name='podro_store_city' style='width: 25em;' required>";
    98                                     echo "<option value='' selected disabled hidden>لطفا شهر فروشگاه را انتخاب کنید.</option>";
    99                                     foreach ($provinces as $province) {
    100                                         echo "<optgroup label='" . esc_attr($province['name']) . "'>";
    101                                         foreach ($province['cities'] as $key => $city)
    102                                             if ($store_city == $key)
    103                                                 echo "<option selected value='" . esc_attr($key) . "'>" . esc_attr($city) . "</option>";
    104                                             else
    105                                                 echo "<option value='" . esc_attr($key) . "'>" . esc_attr($city) . "</option>";
    106                                         echo "</optgroup>";
    107                                     }
    108                                     echo "</select>"
     96                                ();
     97                                required>";
     98                                echo "<option value='' selected disabled hidden>لطفا شهر فروشگاه را انتخاب کنید.</option>";
     99                                foreach ($provinces as $province) {
     100                                    echo "<optgroup label='" . esc_attr($province['name']) . "'>";
     101                                    foreach ($province['cities'] as $key => $city)
     102                                        if ($store_city == $key)
     103                                            echo "<option selected value='" . esc_attr($key) . "'>" . esc_attr($city) . "</option>";
     104                                        else
     105                                            echo "<option value='" . esc_attr($key) . "'>" . esc_attr($city) . "</option>";
     106                                    echo "</optgroup>";
     107                                }
     108                                echo "</select>"
    109109                                ?>
    110110                            </td>
  • podro-wp/tags/1.3.2/assets/js/only-podro-cities.js

    r2852786 r2875990  
    55    function reload_for_cities(){
    66
     7
     8
     9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
    720        if(jQuery('#billing_state option').length > 0){
    8             jQuery('#billing_state').trigger('change');
     21            jQuery('#billing_state').trigger('change');
    922            return;
    1023        }
  • podro-wp/tags/1.3.2/assets/js/only-podro-provinces.js

    r2852786 r2875990  
    1111        billing_element.find('option').remove();
    1212        shipping_element.find('option').remove();
    13         for(let i=0; i< response.length; i++){
    1413
    15             billing_element.append(`<option value='${response[i].code}'>${response[i].name}</option>`);
    16             shipping_element.append(`<option value='${response[i].code}'>${response[i].name}</option>`);
    17 
    18         }
     14        Object.keys(response).forEach(function(key) {
     15           
     16            billing_element.append(`<option value='${key}'>${response[key].name}</option>`);
     17            shipping_element.append(`<option value='${key}'>${response[key].name}</option>`);
     18        })
    1919
    2020    });
  • podro-wp/tags/1.3.2/inc/MetaBox.php

    r2866639 r2875990  
    229229                <label for="podro_store_city">شهر مبدا</label>
    230230                <?php
    231                 $provinces = \WP_PODRO\Engine\WooSetting::get_provinces();
     231                $provinces = \WP_PODRO\Engine\WooSetting::get_p();
    232232                echo "<select  id='podro_store_city' name='podro_store_city'  required>";
    233233                echo "<option value='' selected disabled hidden>لطفا شهر فروشگاه را انتخاب کنید.</option>";
     
    261261                <?php } ?>
    262262                <?php
    263                 $provinces = \WP_PODRO\Engine\WooSetting::get_provinces();
     263                $provinces = \WP_PODRO\Engine\WooSetting::get_p();
    264264                echo "<select  id='pod_destination_city_code' name='pod_destination_city_code'  required>";
    265265                echo "<option value='' selected disabled hidden>لطفا شهر فروشگاه را انتخاب کنید.</option>";
     
    410410        ];
    411411
    412         Helper::log($data);
     412
    413413        $response = (new Providers)->get_providers($data);
    414414
     
    444444        $destination_city_code = get_option('pod_destination_city_code');
    445445
    446         $pod_store_name = get_option('pod_store_name');
     446        $pod_store_name = get_option('pod;
    447447        $pod_user_billing_name = get_option('pod_user_billing_name') . ' ' . get_option('pod_user_billing_family');
    448448        $pod_customer_note = get_option('pod_customer_note');
  • podro-wp/tags/1.3.2/inc/Setup.php

    r2866639 r2875990  
    111111        $woosetting = new WooSetting();
    112112        $cities = $woosetting->get_cities();
     113
    113114
    114115        wp_send_json($cities);
     
    150151        add_action( 'wp_ajax_nopriv_get_podro_cities_by_province', function(){
    151152
    152             $provinces = WooSetting::get_provinces();
     153            $provinces = WooSetting::get_p();
    153154            if(!isset($_POST['province']) || empty($_POST['province'])){
    154155                wp_send_json( $provinces);
     
    167168        add_action( 'wp_ajax_get_podro_cities_by_province', function(){
    168169
    169             $provinces = WooSetting::get_provinces();
     170            $provinces = WooSetting::get_p();
    170171            if(!isset($_POST['province']) || empty($_POST['province'])){
    171172                wp_send_json( $provinces);
  • podro-wp/tags/1.3.2/inc/WooSetting.php

    r2852786 r2875990  
    22
    33namespace WP_PODRO\Engine;
     4
     5
    46
    57class WooSetting
     
    1416            self::$instance = new WooSetting();
    1517        }
     18
     19
    1620        return self::$instance;
     21
    1722    }
    1823    public function change_default_city_filed($general_fields){
     
    349354            )
    350355        );
     356
     357
     358
     359
     360
     361
     362
     363
     364
     365
     366
     367
     368
     369
     370
     371
     372
     373
     374
     375
     376
     377
     378
     379
     380
     381
     382
     383
     384
     385
     386
     387
     388
     389
     390
     391
     392
     393
     394
     395
     396
     397
     398
     399
     400
     401
     402
     403
     404
     405
     406
     407
     408
     409
     410
     411
     412
     413
     414
     415
     416
     417
     418
     419
     420
     421
     422
     423
     424
     425
     426
     427
     428
     429
     430
     431
     432
     433
     434
     435
     436
     437
     438
     439
     440
     441
     442
     443
     444
     445
     446
     447
     448
     449
     450
     451
     452
     453
     454
     455
     456
     457
     458
     459
     460
     461
     462
     463
     464
     465
     466
     467
    351468    }
    352469
     
    442559    }
    443560
     561
     562
     563
     564
     565
     566
     567
     568
     569
     570
     571
     572
     573
     574
     575
     576
     577
     578
     579
     580
     581
     582
     583
     584
     585
     586
     587
     588
     589
     590
     591
     592
     593
     594
     595
     596
    444597    public static function get_city_by_code($code){
    445         $cities = (new self())->get_cities();
     598        $cities = (new self())->get_cities();
    446599        if( array_key_exists($code, $cities) )
    447600            return $cities[$code];
     
    449602
    450603    public static function is_podro_city($city_code){
     604
    451605        return array_key_exists($city_code, (new self())->get_cities());
    452606    }
  • podro-wp/tags/1.3.2/package-lock.json

    r2866639 r2875990  
    16551655        },
    16561656        "node_modules/qs": {
    1657             "version": "6.11.0",
    1658             "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
    1659             "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
     1657            "version": "6.11.",
     1658            "resolved": "https://registry.npmjs.org/qs/-/qs-6.11..tgz",
     1659            "integrity": "sha512-Q==",
    16601660            "dev": true,
    16611661            "dependencies": {
     
    18801880        },
    18811881        "node_modules/spdx-correct": {
    1882             "version": "3.1.1",
    1883             "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
    1884             "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
     1882            "version": "3.",
     1883            "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3..tgz",
     1884            "integrity": "sha512-==",
    18851885            "dev": true,
    18861886            "dependencies": {
     
    34273427        },
    34283428        "qs": {
    3429             "version": "6.11.0",
    3430             "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
    3431             "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
     3429            "version": "6.11.",
     3430            "resolved": "https://registry.npmjs.org/qs/-/qs-6.11..tgz",
     3431            "integrity": "sha512-Q==",
    34323432            "dev": true,
    34333433            "requires": {
     
    35923592        },
    35933593        "spdx-correct": {
    3594             "version": "3.1.1",
    3595             "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
    3596             "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
     3594            "version": "3.",
     3595            "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3..tgz",
     3596            "integrity": "sha512-==",
    35973597            "dev": true,
    35983598            "requires": {
  • podro-wp/tags/1.3.2/vendor/autoload.php

    r2870927 r2875990  
    44
    55if (PHP_VERSION_ID < 50600) {
    6     echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
    7     exit(1);
     6    if (!headers_sent()) {
     7        header('HTTP/1.1 500 Internal Server Error');
     8    }
     9    $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
     10    if (!ini_get('display_errors')) {
     11        if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
     12            fwrite(STDERR, $err);
     13        } elseif (!headers_sent()) {
     14            echo $err;
     15        }
     16    }
     17    trigger_error(
     18        $err,
     19        E_USER_ERROR
     20    );
    821}
    922
    1023require_once __DIR__ . '/composer/autoload_real.php';
    1124
    12 return ComposerAutoloaderInit050c2b8caeeb3afda26dbceabc4405f7::getLoader();
     25return ComposerAutoloaderInit::getLoader();
  • podro-wp/tags/1.3.2/vendor/composer/ClassLoader.php

    r2827875 r2875990  
    4343class ClassLoader
    4444{
     45
     46
     47
    4548    /** @var ?string */
    4649    private $vendorDir;
     
    107110    {
    108111        $this->vendorDir = $vendorDir;
     112
    109113    }
    110114
     
    426430    {
    427431        if ($file = $this->findFile($class)) {
    428             includeFile($file);
     432            $includeFile = self::$includeFile;
     433            $includeFile($file);
    429434
    430435            return true;
     
    556561        return false;
    557562    }
     563
     564
     565
     566
     567
     568
     569
     570
     571
     572
     573
     574
     575
     576
     577
     578
     579
     580
     581
     582
     583
     584
    558585}
    559 
    560 /**
    561  * Scope isolated include.
    562  *
    563  * Prevents access to $this/self from included files.
    564  *
    565  * @param  string $file
    566  * @return void
    567  * @private
    568  */
    569 function includeFile($file)
    570 {
    571     include $file;
    572 }
  • podro-wp/tags/1.3.2/vendor/composer/InstalledVersions.php

    r2827875 r2875990  
    2929    /**
    3030     * @var mixed[]|null
    31      * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
     31     * @psalm-var array{root: array{name: string, }>}|array{}|null
    3232     */
    3333    private static $installed;
     
    4040    /**
    4141     * @var array[]
    42      * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     42     * @psalm-var array<string, array{root: array{name: string, }>}>
    4343     */
    4444    private static $installedByVendor = array();
     
    244244    /**
    245245     * @return array
    246      * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
     246     * @psalm-return array{name: string, }
    247247     */
    248248    public static function getRootPackage()
     
    258258     * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
    259259     * @return array[]
    260      * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
     260     * @psalm-return array{root: array{name: string, }>}
    261261     */
    262262    public static function getRawData()
     
    281281     *
    282282     * @return array[]
    283      * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     283     * @psalm-return list<array{root: array{name: string, }>}>
    284284     */
    285285    public static function getAllRawData()
     
    304304     * @return void
    305305     *
    306      * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
     306     * @psalm-param array{root: array{name: string, }>} $data
    307307     */
    308308    public static function reload($data)
     
    314314    /**
    315315     * @return array[]
    316      * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     316     * @psalm-return list<array{root: array{name: string, }>}>
    317317     */
    318318    private static function getInstalled()
  • podro-wp/tags/1.3.2/vendor/composer/autoload_real.php

    r2870927 r2875990  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit050c2b8caeeb3afda26dbceabc4405f7
     5class ComposerAutoloaderInit
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit050c2b8caeeb3afda26dbceabc4405f7', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit050c2b8caeeb3afda26dbceabc4405f7', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit050c2b8caeeb3afda26dbceabc4405f7::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInit::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • podro-wp/tags/1.3.2/vendor/composer/autoload_static.php

    r2870927 r2875990  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit050c2b8caeeb3afda26dbceabc4405f7
     7class ComposerStaticInit
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    166166    {
    167167        return \Closure::bind(function () use ($loader) {
    168             $loader->prefixLengthsPsr4 = ComposerStaticInit050c2b8caeeb3afda26dbceabc4405f7::$prefixLengthsPsr4;
    169             $loader->prefixDirsPsr4 = ComposerStaticInit050c2b8caeeb3afda26dbceabc4405f7::$prefixDirsPsr4;
    170             $loader->classMap = ComposerStaticInit050c2b8caeeb3afda26dbceabc4405f7::$classMap;
     168            $loader->prefixLengthsPsr4 = ComposerStaticInit::$prefixLengthsPsr4;
     169            $loader->prefixDirsPsr4 = ComposerStaticInit::$prefixDirsPsr4;
     170            $loader->classMap = ComposerStaticInit::$classMap;
    171171
    172172        }, null, ClassLoader::class);
  • podro-wp/tags/1.3.2/vendor/composer/installed.php

    r2870927 r2875990  
    11<?php return array(
    22    'root' => array(
     3
    34        'pretty_version' => 'dev-master',
    45        'version' => 'dev-master',
     6
    57        'type' => 'wordpress-plugin',
    68        'install_path' => __DIR__ . '/../../',
    79        'aliases' => array(),
    8         'reference' => '04b01d50cd8ca86e30dcd1f30ce6e87e70f74e80',
    9         'name' => 'khorshid/wp_podro',
    1010        'dev' => true,
    1111    ),
     
    1414            'pretty_version' => 'v1.12.0',
    1515            'version' => '1.12.0.0',
     16
    1617            'type' => 'composer-plugin',
    1718            'install_path' => __DIR__ . '/./installers',
    1819            'aliases' => array(),
    19             'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19',
    2020            'dev_requirement' => false,
    2121        ),
     
    2323            'pretty_version' => 'v1.0.1',
    2424            'version' => '1.0.1.0',
     25
    2526            'type' => 'library',
    2627            'install_path' => __DIR__ . '/../khorshid/wp-encrypt',
    2728            'aliases' => array(),
    28             'reference' => '67cc7ded5f0319845a917ff7dcaa36349512cac8',
    2929            'dev_requirement' => false,
    3030        ),
     
    3232            'pretty_version' => 'dev-master',
    3333            'version' => 'dev-master',
     34
    3435            'type' => 'wordpress-plugin',
    3536            'install_path' => __DIR__ . '/../../',
    3637            'aliases' => array(),
    37             'reference' => '04b01d50cd8ca86e30dcd1f30ce6e87e70f74e80',
    3838            'dev_requirement' => false,
    3939        ),
  • podro-wp/tags/1.3.2/wp-podro.php

    r2870927 r2875990  
    1010 * Plugin URI:      https://khorshidlab.com/
    1111 * Description:     پادروپین؛ ‌مارکت‌پلیس خدمات پستی است و به فروشگاه‌های آنلاین کمک می‌کند تا فرآیند ارسال سفارش‌های اینترنتی را مدیریت کنند. در پادروپین، بدون مراجعه و یا ثبت قرارداد با شرکت‌های پستی، می‌توان سفارش‌های اینترنتی را با هر یک از شرکت‌های پستی ارسال کرد
    12  * Version:         1.3.1
     12 * Version:         1.3.
    1313 * Author:          Khorshid, Podro
    1414 * Author URI:      https://podro.com/shipping-wordpress-plugin/
     
    3737 */
    3838
    39 define( 'PODRO_VERSION', '1.3.1' );
     39define( 'PODRO_VERSION', '1.3.' );
    4040define( 'PODRO_SLUG', 'podro-wp' );
    4141define( 'PODRO_SETTINGS_PAGE_SLUG', 'podro-wp-settings' );
  • podro-wp/trunk/README.txt

    r2870927 r2875990  
    55Tested up to: 6.1
    66Requires PHP: 7.2
    7 Stable tag: 1.3.1
     7Stable tag: 1.3.
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5858
    5959== Changelog ==
     60
     61
     62
    6063
    6164= 1.3.1 - 2013-02-25 =
  • podro-wp/trunk/admin/views/pages/api-key-settings.php

    r2870927 r2875990  
    9494                            <td>
    9595                                <?php
    96                                     $provinces = \WP_PODRO\Engine\WooSetting::get_provinces();
    97                                     echo "<select  id='podro_store_city' name='podro_store_city' style='width: 25em;' required>";
    98                                     echo "<option value='' selected disabled hidden>لطفا شهر فروشگاه را انتخاب کنید.</option>";
    99                                     foreach ($provinces as $province) {
    100                                         echo "<optgroup label='" . esc_attr($province['name']) . "'>";
    101                                         foreach ($province['cities'] as $key => $city)
    102                                             if ($store_city == $key)
    103                                                 echo "<option selected value='" . esc_attr($key) . "'>" . esc_attr($city) . "</option>";
    104                                             else
    105                                                 echo "<option value='" . esc_attr($key) . "'>" . esc_attr($city) . "</option>";
    106                                         echo "</optgroup>";
    107                                     }
    108                                     echo "</select>"
     96                                ();
     97                                required>";
     98                                echo "<option value='' selected disabled hidden>لطفا شهر فروشگاه را انتخاب کنید.</option>";
     99                                foreach ($provinces as $province) {
     100                                    echo "<optgroup label='" . esc_attr($province['name']) . "'>";
     101                                    foreach ($province['cities'] as $key => $city)
     102                                        if ($store_city == $key)
     103                                            echo "<option selected value='" . esc_attr($key) . "'>" . esc_attr($city) . "</option>";
     104                                        else
     105                                            echo "<option value='" . esc_attr($key) . "'>" . esc_attr($city) . "</option>";
     106                                    echo "</optgroup>";
     107                                }
     108                                echo "</select>"
    109109                                ?>
    110110                            </td>
  • podro-wp/trunk/assets/js/only-podro-cities.js

    r2852786 r2875990  
    55    function reload_for_cities(){
    66
     7
     8
     9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
    720        if(jQuery('#billing_state option').length > 0){
    8             jQuery('#billing_state').trigger('change');
     21            jQuery('#billing_state').trigger('change');
    922            return;
    1023        }
  • podro-wp/trunk/assets/js/only-podro-provinces.js

    r2852786 r2875990  
    1111        billing_element.find('option').remove();
    1212        shipping_element.find('option').remove();
    13         for(let i=0; i< response.length; i++){
    1413
    15             billing_element.append(`<option value='${response[i].code}'>${response[i].name}</option>`);
    16             shipping_element.append(`<option value='${response[i].code}'>${response[i].name}</option>`);
    17 
    18         }
     14        Object.keys(response).forEach(function(key) {
     15           
     16            billing_element.append(`<option value='${key}'>${response[key].name}</option>`);
     17            shipping_element.append(`<option value='${key}'>${response[key].name}</option>`);
     18        })
    1919
    2020    });
  • podro-wp/trunk/inc/MetaBox.php

    r2866639 r2875990  
    229229                <label for="podro_store_city">شهر مبدا</label>
    230230                <?php
    231                 $provinces = \WP_PODRO\Engine\WooSetting::get_provinces();
     231                $provinces = \WP_PODRO\Engine\WooSetting::get_p();
    232232                echo "<select  id='podro_store_city' name='podro_store_city'  required>";
    233233                echo "<option value='' selected disabled hidden>لطفا شهر فروشگاه را انتخاب کنید.</option>";
     
    261261                <?php } ?>
    262262                <?php
    263                 $provinces = \WP_PODRO\Engine\WooSetting::get_provinces();
     263                $provinces = \WP_PODRO\Engine\WooSetting::get_p();
    264264                echo "<select  id='pod_destination_city_code' name='pod_destination_city_code'  required>";
    265265                echo "<option value='' selected disabled hidden>لطفا شهر فروشگاه را انتخاب کنید.</option>";
     
    410410        ];
    411411
    412         Helper::log($data);
     412
    413413        $response = (new Providers)->get_providers($data);
    414414
     
    444444        $destination_city_code = get_option('pod_destination_city_code');
    445445
    446         $pod_store_name = get_option('pod_store_name');
     446        $pod_store_name = get_option('pod;
    447447        $pod_user_billing_name = get_option('pod_user_billing_name') . ' ' . get_option('pod_user_billing_family');
    448448        $pod_customer_note = get_option('pod_customer_note');
  • podro-wp/trunk/inc/Setup.php

    r2866639 r2875990  
    111111        $woosetting = new WooSetting();
    112112        $cities = $woosetting->get_cities();
     113
    113114
    114115        wp_send_json($cities);
     
    150151        add_action( 'wp_ajax_nopriv_get_podro_cities_by_province', function(){
    151152
    152             $provinces = WooSetting::get_provinces();
     153            $provinces = WooSetting::get_p();
    153154            if(!isset($_POST['province']) || empty($_POST['province'])){
    154155                wp_send_json( $provinces);
     
    167168        add_action( 'wp_ajax_get_podro_cities_by_province', function(){
    168169
    169             $provinces = WooSetting::get_provinces();
     170            $provinces = WooSetting::get_p();
    170171            if(!isset($_POST['province']) || empty($_POST['province'])){
    171172                wp_send_json( $provinces);
  • podro-wp/trunk/inc/WooSetting.php

    r2852786 r2875990  
    22
    33namespace WP_PODRO\Engine;
     4
     5
    46
    57class WooSetting
     
    1416            self::$instance = new WooSetting();
    1517        }
     18
     19
    1620        return self::$instance;
     21
    1722    }
    1823    public function change_default_city_filed($general_fields){
     
    349354            )
    350355        );
     356
     357
     358
     359
     360
     361
     362
     363
     364
     365
     366
     367
     368
     369
     370
     371
     372
     373
     374
     375
     376
     377
     378
     379
     380
     381
     382
     383
     384
     385
     386
     387
     388
     389
     390
     391
     392
     393
     394
     395
     396
     397
     398
     399
     400
     401
     402
     403
     404
     405
     406
     407
     408
     409
     410
     411
     412
     413
     414
     415
     416
     417
     418
     419
     420
     421
     422
     423
     424
     425
     426
     427
     428
     429
     430
     431
     432
     433
     434
     435
     436
     437
     438
     439
     440
     441
     442
     443
     444
     445
     446
     447
     448
     449
     450
     451
     452
     453
     454
     455
     456
     457
     458
     459
     460
     461
     462
     463
     464
     465
     466
     467
    351468    }
    352469
     
    442559    }
    443560
     561
     562
     563
     564
     565
     566
     567
     568
     569
     570
     571
     572
     573
     574
     575
     576
     577
     578
     579
     580
     581
     582
     583
     584
     585
     586
     587
     588
     589
     590
     591
     592
     593
     594
     595
     596
    444597    public static function get_city_by_code($code){
    445         $cities = (new self())->get_cities();
     598        $cities = (new self())->get_cities();
    446599        if( array_key_exists($code, $cities) )
    447600            return $cities[$code];
     
    449602
    450603    public static function is_podro_city($city_code){
     604
    451605        return array_key_exists($city_code, (new self())->get_cities());
    452606    }
  • podro-wp/trunk/package-lock.json

    r2866639 r2875990  
    16551655        },
    16561656        "node_modules/qs": {
    1657             "version": "6.11.0",
    1658             "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
    1659             "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
     1657            "version": "6.11.",
     1658            "resolved": "https://registry.npmjs.org/qs/-/qs-6.11..tgz",
     1659            "integrity": "sha512-Q==",
    16601660            "dev": true,
    16611661            "dependencies": {
     
    18801880        },
    18811881        "node_modules/spdx-correct": {
    1882             "version": "3.1.1",
    1883             "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
    1884             "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
     1882            "version": "3.",
     1883            "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3..tgz",
     1884            "integrity": "sha512-==",
    18851885            "dev": true,
    18861886            "dependencies": {
     
    34273427        },
    34283428        "qs": {
    3429             "version": "6.11.0",
    3430             "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
    3431             "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
     3429            "version": "6.11.",
     3430            "resolved": "https://registry.npmjs.org/qs/-/qs-6.11..tgz",
     3431            "integrity": "sha512-Q==",
    34323432            "dev": true,
    34333433            "requires": {
     
    35923592        },
    35933593        "spdx-correct": {
    3594             "version": "3.1.1",
    3595             "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
    3596             "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
     3594            "version": "3.",
     3595            "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3..tgz",
     3596            "integrity": "sha512-==",
    35973597            "dev": true,
    35983598            "requires": {
  • podro-wp/trunk/vendor/autoload.php

    r2870927 r2875990  
    44
    55if (PHP_VERSION_ID < 50600) {
    6     echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
    7     exit(1);
     6    if (!headers_sent()) {
     7        header('HTTP/1.1 500 Internal Server Error');
     8    }
     9    $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
     10    if (!ini_get('display_errors')) {
     11        if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
     12            fwrite(STDERR, $err);
     13        } elseif (!headers_sent()) {
     14            echo $err;
     15        }
     16    }
     17    trigger_error(
     18        $err,
     19        E_USER_ERROR
     20    );
    821}
    922
    1023require_once __DIR__ . '/composer/autoload_real.php';
    1124
    12 return ComposerAutoloaderInit050c2b8caeeb3afda26dbceabc4405f7::getLoader();
     25return ComposerAutoloaderInit::getLoader();
  • podro-wp/trunk/vendor/composer/ClassLoader.php

    r2827875 r2875990  
    4343class ClassLoader
    4444{
     45
     46
     47
    4548    /** @var ?string */
    4649    private $vendorDir;
     
    107110    {
    108111        $this->vendorDir = $vendorDir;
     112
    109113    }
    110114
     
    426430    {
    427431        if ($file = $this->findFile($class)) {
    428             includeFile($file);
     432            $includeFile = self::$includeFile;
     433            $includeFile($file);
    429434
    430435            return true;
     
    556561        return false;
    557562    }
     563
     564
     565
     566
     567
     568
     569
     570
     571
     572
     573
     574
     575
     576
     577
     578
     579
     580
     581
     582
     583
     584
    558585}
    559 
    560 /**
    561  * Scope isolated include.
    562  *
    563  * Prevents access to $this/self from included files.
    564  *
    565  * @param  string $file
    566  * @return void
    567  * @private
    568  */
    569 function includeFile($file)
    570 {
    571     include $file;
    572 }
  • podro-wp/trunk/vendor/composer/InstalledVersions.php

    r2827875 r2875990  
    2929    /**
    3030     * @var mixed[]|null
    31      * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
     31     * @psalm-var array{root: array{name: string, }>}|array{}|null
    3232     */
    3333    private static $installed;
     
    4040    /**
    4141     * @var array[]
    42      * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     42     * @psalm-var array<string, array{root: array{name: string, }>}>
    4343     */
    4444    private static $installedByVendor = array();
     
    244244    /**
    245245     * @return array
    246      * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
     246     * @psalm-return array{name: string, }
    247247     */
    248248    public static function getRootPackage()
     
    258258     * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
    259259     * @return array[]
    260      * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
     260     * @psalm-return array{root: array{name: string, }>}
    261261     */
    262262    public static function getRawData()
     
    281281     *
    282282     * @return array[]
    283      * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     283     * @psalm-return list<array{root: array{name: string, }>}>
    284284     */
    285285    public static function getAllRawData()
     
    304304     * @return void
    305305     *
    306      * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
     306     * @psalm-param array{root: array{name: string, }>} $data
    307307     */
    308308    public static function reload($data)
     
    314314    /**
    315315     * @return array[]
    316      * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     316     * @psalm-return list<array{root: array{name: string, }>}>
    317317     */
    318318    private static function getInstalled()
  • podro-wp/trunk/vendor/composer/autoload_real.php

    r2870927 r2875990  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit050c2b8caeeb3afda26dbceabc4405f7
     5class ComposerAutoloaderInit
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit050c2b8caeeb3afda26dbceabc4405f7', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit050c2b8caeeb3afda26dbceabc4405f7', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit050c2b8caeeb3afda26dbceabc4405f7::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInit::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • podro-wp/trunk/vendor/composer/autoload_static.php

    r2870927 r2875990  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit050c2b8caeeb3afda26dbceabc4405f7
     7class ComposerStaticInit
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    166166    {
    167167        return \Closure::bind(function () use ($loader) {
    168             $loader->prefixLengthsPsr4 = ComposerStaticInit050c2b8caeeb3afda26dbceabc4405f7::$prefixLengthsPsr4;
    169             $loader->prefixDirsPsr4 = ComposerStaticInit050c2b8caeeb3afda26dbceabc4405f7::$prefixDirsPsr4;
    170             $loader->classMap = ComposerStaticInit050c2b8caeeb3afda26dbceabc4405f7::$classMap;
     168            $loader->prefixLengthsPsr4 = ComposerStaticInit::$prefixLengthsPsr4;
     169            $loader->prefixDirsPsr4 = ComposerStaticInit::$prefixDirsPsr4;
     170            $loader->classMap = ComposerStaticInit::$classMap;
    171171
    172172        }, null, ClassLoader::class);
  • podro-wp/trunk/vendor/composer/installed.php

    r2870927 r2875990  
    11<?php return array(
    22    'root' => array(
     3
    34        'pretty_version' => 'dev-master',
    45        'version' => 'dev-master',
     6
    57        'type' => 'wordpress-plugin',
    68        'install_path' => __DIR__ . '/../../',
    79        'aliases' => array(),
    8         'reference' => '04b01d50cd8ca86e30dcd1f30ce6e87e70f74e80',
    9         'name' => 'khorshid/wp_podro',
    1010        'dev' => true,
    1111    ),
     
    1414            'pretty_version' => 'v1.12.0',
    1515            'version' => '1.12.0.0',
     16
    1617            'type' => 'composer-plugin',
    1718            'install_path' => __DIR__ . '/./installers',
    1819            'aliases' => array(),
    19             'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19',
    2020            'dev_requirement' => false,
    2121        ),
     
    2323            'pretty_version' => 'v1.0.1',
    2424            'version' => '1.0.1.0',
     25
    2526            'type' => 'library',
    2627            'install_path' => __DIR__ . '/../khorshid/wp-encrypt',
    2728            'aliases' => array(),
    28             'reference' => '67cc7ded5f0319845a917ff7dcaa36349512cac8',
    2929            'dev_requirement' => false,
    3030        ),
     
    3232            'pretty_version' => 'dev-master',
    3333            'version' => 'dev-master',
     34
    3435            'type' => 'wordpress-plugin',
    3536            'install_path' => __DIR__ . '/../../',
    3637            'aliases' => array(),
    37             'reference' => '04b01d50cd8ca86e30dcd1f30ce6e87e70f74e80',
    3838            'dev_requirement' => false,
    3939        ),
  • podro-wp/trunk/wp-podro.php

    r2870927 r2875990  
    1010 * Plugin URI:      https://khorshidlab.com/
    1111 * Description:     پادروپین؛ ‌مارکت‌پلیس خدمات پستی است و به فروشگاه‌های آ��لاین کمک می‌کند تا فرآیند ارسال سفارش‌های اینترنتی را مدیریت کنند. در پادروپین، بدون مراجعه و یا ثبت قرارداد با شرکت‌های پستی، می‌توان سفارش‌های اینترنتی را با هر یک از شرکت‌های پستی ارسال کرد
    12  * Version:         1.3.1
     12 * Version:         1.3.
    1313 * Author:          Khorshid, Podro
    1414 * Author URI:      https://podro.com/shipping-wordpress-plugin/
     
    3737 */
    3838
    39 define( 'PODRO_VERSION', '1.3.1' );
     39define( 'PODRO_VERSION', '1.3.' );
    4040define( 'PODRO_SLUG', 'podro-wp' );
    4141define( 'PODRO_SETTINGS_PAGE_SLUG', 'podro-wp-settings' );
Note: See TracChangeset for help on using the changeset viewer.