Plugin Directory

Changeset 2413944


Ignore:
Timestamp:
11/06/2020 02:26:26 PM (5 years ago)
Author:
doorhub2020
Message:

Fixed the shipping method check for doorhub if multiple shipping approved
version 1.1.3

Location:
doorhub
Files:
41 added
6 edited

Legend:

Unmodified
Added
Removed
  • doorhub/trunk/README.md

    r2413831 r2413944  
    44Requires at least: 3.0.1
    55Tested up to: 5.4.1
    6 Stable tag: 1.1.2
     6Stable tag: 1.1.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • doorhub/trunk/includes/class-wc-doorhub-communicator.php

    r2407508 r2413944  
    4747        }
    4848
    49         $shipping_method = $order->get_shipping_method();
    50 
    51         //error_log($shipping_method);
    52 
    53         if($shipping_method == 'Doorhub Shipping'){
     49        $shipping_methods = WC()->session->get('chosen_shipping_methods');
     50
     51        if(in_array('wc_doorhub', $shipping_methods)){
     52
    5453            $address = WC()->countries->get_formatted_address( $order->get_address( 'shipping' ), ', ' );
    5554
  • doorhub/trunk/includes/class-wc-doorhub.php

    r2413831 r2413944  
    212212
    213213        $this->loader->add_action( 'woocommerce_checkout_fields',  $plugin_public, 'delivery_date_field_new' );
    214         $this->loader->add_action( 'woocommerce_checkout_process',  $plugin_public, 'delivery_date_field_validate' );
    215         $this->loader->add_action( 'woocommerce_checkout_update_order_meta',  $plugin_public, 'delivery_date_field_store' );
     214        //$this->loader->add_action( 'woocommerce_checkout_process',  $plugin_public, 'delivery_date_field_validate' );
     215        //$this->loader->add_action( 'woocommerce_checkout_update_order_meta',  $plugin_public, 'delivery_date_field_store' );
    216216    }
    217217
  • doorhub/trunk/public/class-wc-doorhub-public.php

    r2413831 r2413944  
    151151    public function manual_doorhub_call() {
    152152
    153         if($GLOBALS['dh-order-id'] !== NULL){
     153        if(isset($GLOBALS['dh-order-id']) && $GLOBALS['dh-order-id'] !== NULL){
    154154            if ( $order_id = get_query_var( 'dh-order-id' ) ) {
    155155                $response = $this->create_doorhub_order( $order_id );
  • doorhub/trunk/readme.txt

    r2413831 r2413944  
    44Requires at least: 3.0.1
    55Tested up to: 5.4.1
    6 Stable tag: 1.1.2
     6Stable tag: 1.1.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • doorhub/trunk/wc-doorhub.php

    r2413837 r2413944  
    1414 * Plugin Name:       Doorhub
    1515 * Description:       You can easily integrate Doorhub.io using this plugin
    16  * Version:           1.1.2
     16 * Version:           1.1.3
    1717 * Author:            Doorhub
    1818 * Author URI:        https://doorhub.io
     
    3333 * Rename this for your plugin and update it as you release new versions.
    3434 */
    35 define( 'WC_DOORHUB_VERSION', '1.1.2' );
     35define( 'WC_DOORHUB_VERSION', '1.1.3' );
    3636
    3737/**
Note: See TracChangeset for help on using the changeset viewer.