title: PHP WooCommerce Rest API Client Library Create Multiple Coupons
body: <p>I am trying to create multiple coupons in my WordPress site externally from my PHP site and I am making a use of woocommerce-api client library.
  I am preparing an array of coupon codes to pass to the Create Coupon method so that I can create multiple coupons at once. but its not really working as it returns me the following Error message " Error: Missing parameter code [woocommerce_api_missing_coupon_code]" Here is my Code</p>
  
  <pre><code>      foreach ($tags-&gt;result() as $row) {
              $coupons[$i]['code'] = $row-&gt;id_tag;
              $coupons[$i]['type'] = 'fixed_cart';
              $coupons[$i]['amount'] = 5;
              $i++;
          }
  
          print_r($coupons);
          print_r($coupons[0]);
          require_once '/application/lib/woocommerce-api.php';
          $consumer_key = 'ck_consumerKey'; // Add your own Consumer Key here
          $consumer_secret = 'cs_ConsumeSecret'; // Add your own Consumer Secret here
          $store_url = 'http://mySiteUrl'; // Add the home URL to the store you want to connect to here             
          try
          {
             $client = new WC_API_Client( $store_url, $consumer_key, $consumer_secret );
  
             $client-&gt;coupons-&gt;create( $coupons[0]);
             $client-&gt;coupons-&gt;create( $coupons);
          }
          catch ( WC_API_Client_Exception $e ) 
          {
              echo $e-&gt;getMessage() . PHP_EOL;
              echo $e-&gt;getCode() . PHP_EOL;
              if ( $e instanceof WC_API_Client_HTTP_Exception ) 
              {
                  print_r( $e-&gt;get_request() );
                  print_r( $e-&gt;get_response() );
              }
  
          }  
  </code></pre>
  
  <p>This $client->coupons->create( $coupons[0]) where I am passing only the first index of array creates a single coupon successfully but the second line where I pass the whole array to the create method doesn't create any coupon and returns me the following error 
   Error: Missing parameter code[woocommerce_api_missing_coupon_code] </p>
  
  <p>I have printed the coupons[] array and it contains the following data </p>
  
  <pre><code> Array ( [0] =&gt; Array ( [code] =&gt; AA12B001 [type] =&gt; fixed_cart [amount] =&gt; 5 ) [1] =&gt; Array ( [code] =&gt; AA12B002 [type] =&gt; fixed_cart [amount] =&gt; 5 )) 
  </code></pre>
  
  <p>where as if i print the coupons[0] it contains the following data</p>
  
  <pre><code> Array ( [code] =&gt; AA12B001 [type] =&gt; fixed_cart [amount] =&gt; 5 )  
  </code></pre>
  
  <p>Any Help Please? </p>