Uncaught TypeError
-
Hi there and thanks for your plugin.
On a customer website, they have noticed that when editing a specific woocommerce product in a different language (they use WPML), they can’t see the metabox. They get this error:
Uncaught TypeError: array_key_first(): Argument #1 ($array) must be of type array, string given in /home2/XXXXX/public_html/wp-content/plugins/google-listings-and-ads/src/Product/ProductHelper.php:615
Stack trace:
#0 /home2/XXXXX/public_html/wp-content/plugins/google-listings-and-ads/src/Product/ProductHelper.php(615): array_key_first('a:4:{i:4213;a:1...')
#1 /home2/XXXXX/public_html/wp-content/plugins/google-listings-and-ads/src/Admin/MetaBox/ChannelVisibilityMetaBox.php(127): Automattic\WooCommerce\GoogleListingsAndAds\Product\ProductHelper->get_validation_errors(Object(WC_Product_Variable))
#2 /home2/XXXXX/public_html/wp-content/plugins/google-listings-and-ads/src/Admin/MetaBox/AbstractMetaBox.php(107): Automattic\WooCommerce\GoogleListingsAndAds\Admin\MetaBox\ChannelVisibilityMetaBox->get_view_context(Object(WP_Post), Array)
#3 /home2/XXXXX/public_html/wp-admin/includes/template.php(1456): Automattic\WooCommerce\GoogleListingsAndAds\Admin\MetaBox\AbstractMetaBox->handle_callback(Object(WP_Post), Array)
#4 /home2/XXXXX/public_html/wp-admin/edit-form-advanced.php(716): do_meta_boxes(Object(WP_Screen), 'side', Object(WP_Post))
#5 /home2/XXXXX/public_html/wp-admin/post.php(206): require('/home2/XXXXX...')
#6 {main}It happens on a few products so they can’t edit the meta of those. Can you please assist with this?
- You must be logged in to reply to this topic.