WooParc_checkexport

Check if order is ready for export, based on advanced export settings.

Description

WooParc_checkexport( $order, (constant) $single = false, (constant) $quick = false ); 

Parameters (3)

0. $order
The order.
1. $single — Optional. (constant) => false
The single.
2. $quick — Optional. (constant) => false
The quick.

Usage

  1. if ( !function_exists( 'WooParc_checkexport' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-postnl-parcelware/inc/funct-export.php'; 
  3.  
  4. // The order. 
  5. $order = null; 
  6.  
  7. // The single. 
  8. $single = false; 
  9.  
  10. // The quick. 
  11. $quick = false; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = WooParc_checkexport($order, $single, $quick); 
  15.  

Defined (1)

The function is defined in the following location(s).

/inc/funct-export.php  
  1. function WooParc_checkexport($order, $single=false, $quick=false) { 
  2.  
  3. $shipping_cost=WooParc_shipping_cost($order->order_shipping); 
  4. $shipping_minimum=WooParc_shipping_cost(get_option('wooparc_shipping_cost', 0)); 
  5. $shipping_methods=get_option('wooparc_shipping_method', array()); 
  6.  
  7. if(($shipping_cost>=$shipping_minimum && in_array($order->shipping_method, $shipping_methods)) || $quick==true || $single==true) { 
  8. return true; 
  9. } else { 
  10. return false;