Hi,
I am encountering this notice, which I believe may be caused by the theme or Swift Framework:
Notice: get_cart was called <strong>incorrectly</strong>. Get cart should not be called before the wp_loaded action.
I only see this notice in AJAX responses for some reason. I found it while debugging Contact Form 7–an infinite load animation after submitting the form. I found an AJAX JSON error because the above notice is showing up outside of the JSON response (WP_DEBUG is turned on). However, I’m not having any luck figuring out what is calling get_cart() before the wp_loaded action, or why this notice doesn’t show up when I normally fetch pages. Here are my active plugins:
Advanced Custom Fields
Akismet
Contact Form 7
Custom Permalinks
Custom WooCommerce Pricing
Custom WooCommerce Sorting
Ebay HTML for WooCommerce
Google Product Feed for WooCommerce
Newsletter
oAuth Twitter Feed for Developers
Swift Framework
WooCommerce
YITH WooCommerce Wishlist
Yoast SEO
I tried disabling the custom WooCommerce plugins to no avail (the ones for pricing, sorting, Ebay HTML, and the Google product feed). None of them interacts with get_cart() or the WC_Cart class. I also tried disabling the Wishlist plugin with the same result. So it looks like the issue may be with the theme or Swift Framework somewhere. Do you think that you could help me find a solution?
Thanks,
Chris