Plugin Directory

Changeset 3182966


Ignore:
Timestamp:
11/06/2024 08:55:40 AM (17 months ago)
Author:
eshoplogistic
Message:

Исправление ошибок

Location:
eshoplogisticru/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • eshoplogisticru/trunk/Modules/Unloading.php

    r3182461 r3182966  
    165165
    166166        if ( $pageType == 'shop_order' ) {
    167             $order          = wc_get_order( $postId );
    168             $orderShippings = $order->get_shipping_methods();
    169             $orderShipping  = array();
    170 
    171             foreach ( $orderShippings as $key => $item ) {
    172                 $orderShipping = array(
    173                     'id'   => $item->get_method_id(),
    174                     'name' => $item->get_method_title(),
    175                 );
    176             }
    177             $checkDelivery = stripos( $orderShipping['id'], WC_ESL_PREFIX );
    178             if ( $checkDelivery === false ) {
    179                 return false;
    180             }
    181 
    182             $checkName = $this->getMethodByName( $orderShipping['name'] );
    183             if ( ! $checkName['name'] ) {
    184                 return false;
    185             }
    186167
    187168            add_meta_box(
     
    213194
    214195        if ( ( $pageType == 'shop_order' && $pagenow == 'post.php' ) || ( $pageType == 'shop_order' && $pagenow == 'admin.php' ) ) {
     196            $order          = wc_get_order( $postId );
     197            $orderShippings = $order->get_shipping_methods();
     198            $orderShipping  = array();
     199
     200            foreach ( $orderShippings as $key => $item ) {
     201                $orderShipping = array(
     202                    'id'   => $item->get_method_id(),
     203                    'name' => $item->get_method_title(),
     204                );
     205            }
     206            $checkDelivery = stripos( $orderShipping['id'], WC_ESL_PREFIX );
     207            if ( $checkDelivery === false ) {
     208                return false;
     209            }
     210
     211            $checkName = $this->getMethodByName( $orderShipping['name'] );
     212            if ( ! $checkName['name'] ) {
     213                return false;
     214            }
     215
    215216            $order = wc_get_order( $postId );
    216217            if ( $order !== false ) {
  • eshoplogisticru/trunk/readme.txt

    r3182461 r3182966  
    44Requires at least: 5.3
    55Tested up to: 6.6
    6 Stable tag: 2.1.36
     6Stable tag: 2.1.37
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • eshoplogisticru/trunk/views/unloading-form.php

    r3154034 r3182966  
    295295                        <?php if ( isset( $additionalFields ) && $additionalFields ): ?>
    296296                            <div class="esl-box_add">
    297                                 <?php foreach ( $additionalFields as $key => $value ): ?>
     297                                <?php foreach ( $additionalFields as $key => $value ):
     298                                    if(!isset($v['name']))
     299                                        continue;
     300                                    ?>
    298301                                    <p><?php echo ( $additionalFieldsRu[ $key ] ) ?? $key ?></p>
    299302                                    <?php foreach ( $value as $k => $v ): ?>
  • eshoplogisticru/trunk/wc-eshop-logistic.php

    r3182461 r3182966  
    66 *
    77 * @link              https://wp.eshoplogistic.ru/
    8  * @since             2.1.36
     8 * @since             2.1.37
    99 * @package           WC_Eshop_Logistic
    1010 *
     
    1313 * Plugin URI:        https://wp.eshoplogistic.ru/
    1414 * Description:       Несколько служб доставки в одной интеграции: CDEK, DPD, Boxberry, IML, Почта России, Деловые Линии, ПЭК, Dostavista, GTD, Байкал Сервис и др.
    15  * Version:           2.1.36
     15 * Version:           2.1.37
    1616 * Author:            eShopLogistic
    1717 * Author URI:        https://eshoplogistic.ru/p747575
     
    4141define( 'WC_ESL_PLUGIN_DIR', plugin_dir_path(__FILE__) );
    4242
    43 define( 'WC_ESL_VERSION', '2.1.36' );
     43define( 'WC_ESL_VERSION', '2.1.37' );
    4444
    4545define( 'WC_ESL_DOMAIN', 'wc-esl' );
Note: See TracChangeset for help on using the changeset viewer.