Fix array of state
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 16 May 2019 18:59:04 +0000 (14:59 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 16 May 2019 18:59:04 +0000 (14:59 -0400)
should output state.value

lib/GlmPDFLabel.php

index 9cbf2b6..884edef 100644 (file)
@@ -58,6 +58,7 @@ class GlmPDFLabel extends Cezpdf
             $columnCount = 0;
             $rowCount    = 0;
             foreach ( $accounts as $account ) {
+                // echo '<pre>$account: ' . print_r( $account, true ) . '</pre>';
                 // $account = $invData['account'];
                 $columnCount++;
                 $colName = ( $columnCount % 2 == 0 ) ? 'col2' : 'col1';
@@ -76,7 +77,7 @@ class GlmPDFLabel extends Cezpdf
                     '<b>'.$account['ref_name'].'</b>',
                     $addressLine,
                     $account['billing_city'],
-                    $account['billing_state'],
+                    $account['billing_state']['value'],
                     $account['billing_zip']
                 );
                 if ( $columnCount % 2 == 0 ) {