Plugin Directory

Changeset 3332912


Ignore:
Timestamp:
07/23/2025 01:06:37 PM (8 months ago)
Author:
gobuddynetwork1
Message:

Enabled order sending to Gobuddy

Location:
gobuddy-the-smart-delivery-solution
Files:
16 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • gobuddy-the-smart-delivery-solution/trunk/gobuddy-shipping.php

    r3331241 r3332912  
    99 * Developer URI:           https://gobuddy.net
    1010 * Text Domain:             gobuddy-the-smart-delivery-solution
    11  * Version:                 2.4.3.1
     11 * Version:                 2.4.3.2
    1212 * Requires at least:       5.6
    1313 * Tested up to:            6.8
     
    2525define( 'GB_BASE_DIR', plugin_dir_path( __FILE__ ) );
    2626define( 'GB_BASE_URL', plugin_dir_url( __FILE__ ) );
    27 define( 'GB_VERSION', '2.4.3.1' );
     27define( 'GB_VERSION', '2.4.3.2' );
    2828define( 'GB_API_BASE', 'https://api.gobuddy.net' );
    2929define( 'GB_API_VERSION', 'v3' );
  • gobuddy-the-smart-delivery-solution/trunk/readme.txt

    r3331241 r3332912  
    22Contributors: gobuddynetwork1
    33Tags: courier, e-commerce, shipping, woocommerce, delivery
    4 Stable tag: 2.4.3.1
     4Stable tag: 2.4.3.2
    55Requires at least: 5.6
    66Tested up to: 6.8
     
    100100== Changelog ==
    101101
     102= 2.4.3.2 =
     103* Enabled order sending to Gobuddy.
     104
    102105= 2.4.3.1 =
    103106* Fix a minor issue.
  • gobuddy-the-smart-delivery-solution/trunk/src/class-gobuddy.php

    r3331241 r3332912  
    5656        }
    5757
    58         //if( self::is_valid_store() ) {
     58        if( self::is_valid_store() ) {
    5959
    6060            add_filter( 'wc_order_statuses', array( 'Gobuddy', 'add_status_to_list' ), 20 );
     
    6363            add_action( 'admin_notices', array( 'Gobuddy', 'status_notices' ) );
    6464           
    65             // add_action( 'gb_send_order_update_twicedaily', array( 'Gobuddy', 'send_order_update' ) );
    66 
    67             // add_action( 'woocommerce_new_order', array( 'Gobuddy', 'new_order_created' ), 10, 2 );
    68             // add_action( 'woocommerce_checkout_order_created', array( 'Gobuddy', 'checkout_order_created' ), 10, 1 );
    69             // add_action( 'woocommerce_order_payment_status_changed', array( 'Gobuddy', 'payment_status_changed' ), 10, 2 );
    70             // add_action( 'woocommerce_order_status_changed', array( 'Gobuddy', 'order_status_changed' ), 10, 3 );
    71             // add_filter( 'woocommerce_order_data_store_cpt_get_orders_query', array( 'Gobuddy', 'handle_custom_order_query_var' ), 10, 2 );
    72 
    73             // wp_clear_scheduled_hook( 'gb_send_order_update' );
    74             // if ( ! wp_next_scheduled( 'gb_send_order_update_twicedaily' ) ) {
    75             //     // wp_schedule_event( time() + (60 * 30), 'twicedaily', 'gb_send_order_update_twicedaily' );               
    76             //     wp_schedule_event( time() + (60 * 5), 'twicedaily', 'gb_send_order_update_twicedaily' );
    77             // }
     65            add_action( 'gb_send_order_update_twicedaily', array( 'Gobuddy', 'send_order_update' ) );
     66
     67            add_action( 'woocommerce_new_order', array( 'Gobuddy', 'new_order_created' ), 10, 2 );
     68            add_action( 'woocommerce_checkout_order_created', array( 'Gobuddy', 'checkout_order_created' ), 10, 1 );
     69            add_action( 'woocommerce_order_payment_status_changed', array( 'Gobuddy', 'payment_status_changed' ), 10, 2 );
     70            add_action( 'woocommerce_order_status_changed', array( 'Gobuddy', 'order_status_changed' ), 10, 3 );
     71            add_filter( 'woocommerce_order_data_store_cpt_get_orders_query', array( 'Gobuddy', 'handle_custom_order_query_var' ), 10, 2 );
     72
     73            wp_clear_scheduled_hook( 'gb_send_order_update' );
     74            if ( ! wp_next_scheduled( 'gb_send_order_update_twicedaily' ) ) {
     75                // wp_schedule_event( time() + (60 * 30), 'twicedaily', 'gb_send_order_update_twicedaily' );               
     76                wp_schedule_event( time() + (60 * 5), 'twicedaily', 'gb_send_order_update_twicedaily' );
     77            }
    7878
    7979            // Add custom order status
     
    102102                )
    103103            );
    104         //}
     104        }
    105105
    106106        self::$weight_unit = get_option( 'woocommerce_weight_unit' );
     
    128128                'GB_version'    => GB_VERSION,
    129129                'GB_client_id'  => self::$gb_config[ 'gb_key' ],
     130                'wc_key'        => self::$gb_config[ 'wc_key' ],
     131                'wc_secret'     => self::$gb_config[ 'wc_secret' ],
    130132            ]
    131133        );
     
    179181            $response_code = wp_remote_retrieve_response_code($token_response);
    180182
    181             if($response_code == 401) {
     183            if($response_code == 401 || $response_code == 403) {
    182184                self::check_token( 'new' );
    183185                return FALSE;
Note: See TracChangeset for help on using the changeset viewer.