GetCartCreateParams

The WooCommerce EU VAT Assistant GetCartCreateParams function.

Description

GetCartCreateParams(); 

Usage

  1. if ( !function_exists( 'GetCartCreateParams' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-eu-vat-assistant/src/vendor/codecasts/nusoap-php7/samples/wsdlclient12.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = GetCartCreateParams(); 
  7.  

Defined (1)

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

/src/vendor/codecasts/nusoap-php7/samples/wsdlclient12.php  
  1. function GetCartCreateParams() { 
  2. global $SubscriptionId; 
  3.  
  4. // create items to be added to the cart 
  5. $item = array (); 
  6. $item[0] = array( "ASIN" => "0596004206",  
  7. "Quantity" => "1" 
  8. ); 
  9. $item[1] = array( "ASIN" => "0596003277",  
  10. "Quantity" => "2" 
  11. ); 
  12.  
  13. // pack it to <Item> array 
  14. $items = array("Item" => $item); 
  15. // Construct request parameters 
  16. $request = array("Items" => $items, "ResponseGroup" => "CartSimilarities"); 
  17.  
  18. // Construct all parameters 
  19. $cartCreate = array( "SubscriptionId" => $SubscriptionId,  
  20. "Request" => $request 
  21. ); 
  22.  
  23. return $cartCreate;