woocommerce-api-import-products
woocommerce-api-import-products copied to clipboard
Cannot use object of type stdClass as array
PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /var/www/html/tnt.amazingoverstock.com/public_html/includes/woocommerce/import.php:54 Stack trace: #0 {main} thrown in /var/www/html/public_html/includes/woocommerce/import.php on line 54
error lines are: status_message( 'Attribute added. ID: '. $wc_attribute['id'] ); $added_attributes[$product_attribute_name]['id'] = $wc_attribute['id'];
Var_dump does show as stdClass
You need to change $wc_attribute['id']
to $wc_attribute->id
, since thats a class you can't access it like an array.
Sorry for the delay but I hope it helps someone.