Plugin Directory

Changeset 2972632


Ignore:
Timestamp:
09/28/2023 12:06:10 PM (2 years ago)
Author:
shipbubble
Message:

orders table bug fix

Location:
shipbubble
Files:
45 added
3 edited

Legend:

Unmodified
Added
Removed
  • shipbubble/trunk/admin/woocommerce/orders.php

    r2957216 r2972632  
    9090        if ($key == 'order_status') {
    9191            // Inserting after STATUS Column
    92             $reorderedColumns['shipping_status'] = __('Shipping Status', 'theme_domain');
     92            $reorderedColumns['sb_shipping_status'] = esc_html('Shipbubble Status');
    9393        }
    9494    }
     
    101101function custom_orders_list_column_content($column, $post_id)
    102102{
     103    $order = wc_get_order($post_id);
     104    $orderShippingMethod = $order->get_items('shipping');
     105    $orderShippingMethodId = '';
     106
    103107    switch ($column) {
    104         case 'shipping_status':
    105             $order = wc_get_order($post_id);
    106             $orderShippingMethodId = reset($order->get_items('shipping'))->get_method_id();
    107 
    108             if (strtolower($orderShippingMethodId) === strtolower(SHIPBUBBLE_ID)) {
     108        case 'sb_shipping_status':
     109            if (is_array($orderShippingMethod)) {
     110                $orderShippingMethodId = reset($orderShippingMethod)->get_method_id();
     111            }
     112
     113            if (!empty($orderShippingMethodId) && strtolower($orderShippingMethodId) === strtolower(SHIPBUBBLE_ID)) {
    109114                $status = get_post_meta($post_id, 'shipbubble_tracking_status', true);
    110115                if (!empty($status)) {
     
    119124                        </mark>';
    120125                }
     126            } elseif (!empty($orderShippingMethodId)) {
     127                echo esc_html($order->get_shipping_method());
    121128            } else {
    122                 echo esc_html($order->get_shipping_method());
     129                echo esc_html('Not Specified');
    123130            }
    124 
    125131
    126132            break;
  • shipbubble/trunk/readme.txt

    r2972370 r2972632  
    55Requires at least: 4.0
    66Tested up to: 6.3
    7 Stable tag: 1.5
     7Stable tag: 1.5.1
    88Requires PHP: 5.6
    99License: GPLv3 or later
  • shipbubble/trunk/shipbubble.php

    r2972370 r2972632  
    99 * Requires at least: 4.0
    1010 * Tested up to: 6.3
    11  * Version: 1.5
     11 * Version: 1.5.1
    1212 * Requires PHP: 5.6
    1313 * Text Domain:  shipbubble
Note: See TracChangeset for help on using the changeset viewer.