Fatal error: missing “is_setup_complete”
-
Hello,
I found a fatal error when opening the Coupons screen in WooCommerce.
Environment:
- WordPress: 6.9.4
- PHP: 8.3
- WooCommerce: 10.6.0
- Google for WooCommerce: 3.5.3
Issue:
When I open the Coupons tab / add a new coupon, the page triggers a fatal error related to the Google for WooCommerce plugin.From the stack trace, it looks like the plugin tries to render the coupon meta box view:
views/meta-box/coupon_channel_visibility.phpInside that view, it expects the property:
is_setup_completeBut this property is missing from the view context, which causes the fatal error.
Error log:
[13-Mar-2026 00:28:28 UTC] PHP Fatal error: Uncaught Automattic\WooCommerce\GoogleListingsAndAds\View\ViewException: The property “is_setup_complete” could not be found within the context of the currently rendered view. in /home/public_html/wp-content/plugins/google-listings-and-ads/src/View/ViewException.php:70
Stack trace: 0 /home/public_html/wp-content/plugins/google-listings-and-ads/src/View/PHPView.php(216): Automattic\WooCommerce\GoogleListingsAndAds\View\ViewException::invalid_context_property(‘is_setup_comple…’) 1 /home/public_html/wp-content/plugins/google-listings-and-ads/views/meta-box/coupon_channel_visibility.php(40): Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView->__get(‘is_setup_comple…’) 2 /home/public_html/wp-content/plugins/google-listings-and-ads/src/View/PHPView.php(80): include(‘/home/…’) 3 /home/public_html/wp-content/plugins/google-listings-and-ads/src/Admin/Admin.php(291): Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView->render(Array) 4 /home/public_html/wp-content/plugins/google-listings-and-ads/src/Admin/MetaBox/AbstractMetaBox.php(137): Automattic\WooCommerce\GoogleListingsAndAds\Admin\Admin->get_view(‘meta-box/coupon…’, Array) 5 /home/public_html/wp-content/plugins/google-listings-and-ads/src/Admin/MetaBox/AbstractMetaBox.php(116): Automattic\WooCommerce\GoogleListingsAndAds\Admin\MetaBox\AbstractMetaBox->render(Array) 6 /home/public_html/wp-admin/includes/template.php(1453): Automattic\WooCommerce\GoogleListingsAndAds\Admin\MetaBox\AbstractMetaBox->handle_callback(Object(WP_Post), Array) 7 /home/public_html/wp-admin/edit-form-advanced.php(714): do_meta_boxes(Object(WP_Screen), ‘side’, Object(WP_Post)) 8 /home/public_html/wp-admin/post-new.php(75): require(‘/home/…’) 9 {main}Next Automattic\WooCommerce\GoogleListingsAndAds\View\ViewException: Could not load the View URI “/home/public_html/wp-content/plugins/google-listings-and-ads/views/meta-box/coupon_channel_visibility.php”. Reason: “The property “is_setup_complete” could not be found within the context of the currently rendered view.”. in /home/public_html/wp-content/plugins/google-listings-and-ads/src/View/ViewException.php:35
…
thrown in /home/public_html/wp-content/plugins/google-listings-and-ads/src/View/ViewException.php on line 35Expected behavior:
Opening the Coupons screen should not trigger a fatal error, even if Google for WooCommerce is not fully configured or if coupon channel visibility is unavailable.Actual behavior:
The Coupons screen crashes because the view expects a missing context property.Can you confirm if this is a bug in version 3.5.3, and if there is a workaround or patch available?
Thank you.
You must be logged in to reply to this topic.