Plugin Directory

Changeset 2987488


Ignore:
Timestamp:
11/01/2023 03:22:10 PM (2 years ago)
Author:
shipbubble
Message:

Admin process shipment bug fix

Location:
shipbubble
Files:
45 added
2 edited

Legend:

Unmodified
Added
Removed
  • shipbubble/trunk/readme.txt

    r2987027 r2987488  
    55Requires at least: 4.0
    66Tested up to: 6.3
    7 Stable tag: 1.7.2
     7Stable tag: 1.7.3
    88Requires PHP: 5.6
    99License: GPLv3 or later
  • shipbubble/trunk/shipbubble.php

    r2987026 r2987488  
    99 * Requires at least: 4.0
    1010 * Tested up to: 6.3
    11  * Version: 1.7.2
     11 * Version: 1.7.3
    1212 * Requires PHP: 5.6
    1313 * Text Domain:  shipbubble
     
    267267}
    268268
    269 add_action('woocommerce_checkout_order_processed', 'handle_processed', 10, 1);
    270 function handle_processed($order_id)
    271 {
    272     $order = new WC_Order($order_id);
    273     $shipping_items = $order->get_items('shipping');
    274     $shipping_total = $order->get_shipping_total();
    275 
    276     if ($order->has_shipping_method(SHIPBUBBLE_ID) && (empty($shipping_items) || "0" == $shipping_total)) {
    277         $order->delete();
    278         wp_send_json_error();
    279     }
    280 }
     269// add_action( 'woocommerce_checkout_order_processed', 'handle_processed', 10, 1 );
     270// function handle_processed($order_id)
     271// {
     272//  $order = new WC_Order( $order_id );
     273//  $shipping_items = $order->get_items('shipping');
     274//  $shipping_total = $order->get_shipping_total();
     275
     276//     if ($order->has_shipping_method(SHIPBUBBLE_ID) && (empty($shipping_items) || "0" == $shipping_total))
     277//  {
     278//      $order->delete();
     279//         wp_send_json_error();
     280//     }
     281// }
    281282
    282283add_action('woocommerce_thankyou', 'shipbubble_create_shipment_after_order_created', 10, 1);
Note: See TracChangeset for help on using the changeset viewer.