예제 #1
0
 private static function set_posted_properties()
 {
     if (isset($_POST['email'])) {
         self::$email = sanitize_email($_POST['email']);
     }
     if (isset($_POST['password'])) {
         self::$passwd = sanitize_text_field($_POST['password']);
     }
     if (isset($_POST['server'])) {
         self::$endpoint = (bool) $_POST['server'] ? 'https://api.beta.shipwire.com/exec/' : 'https://api.shipwire.com/exec/';
     }
 }
예제 #2
0
 /**
  * Sets up properties, sends Order via API on checkout success.  Initial hook for AJAX link in admin
  *
  * @since 3.8.9
  * @return type
  */
 private function __construct()
 {
     self::$email = get_option('shipwireemail');
     self::$passwd = get_option('shipwirepassword');
     self::$server = 'Production';
     self::$warehouse = '00';
     self::$endpoint = 'https://api.shipwire.com/exec/';
     //For testing, change to api.beta.shipwire
     //Hooks into transaction results for Order Fulfillment API.  wpsc_confirm_checkout would be logical - but it is run for each cart item.
     //In fact, the only two current transaction page actions happen within the cart loop.  Not great.
     //I believe there is a patch on Issue 490 that proposes a 'wpsc_transaction_results_shutdown' action.  It doesn't pass a $log_id, but it does pass a sessionid, which is fine.
     add_action('wpsc_transaction_results_shutdown', array($this, 'shipwire_on_checkout'), 10, 3);
     //Hooks into ajax handler for Inventory Sync and Tracking API.  Handler is run upon clicking "Update Tracking and Inventory" in Shipping Settings
     add_action('wp_ajax_sync_shipwire_products', array($this, 'sync_products'));
 }
예제 #3
0
function shipwire_send_tracking_request($xml)
{
    _wpsc_deprecated_function(__FUNCTION__, '3.8.9', 'WPSC_Shipwire');
    return WPSC_Shipwire::send_tracking_request($xml);
}
예제 #4
0
 function getQuote()
 {
     return WPSC_Shipwire::get_shipping_quotes();
 }