Critical bug in v1.3 that intervenes in EACH request in admin panel
-
We noticed that random plugins stopped saving changes to their settings — no error, the page just normally reloads after submitting the form yet no changes are applied. Then we noticed that even certain basic actions, such as deleting or updating plugins, stopped working — the XHR request to admin-ajax.php returned 400 Bad Request with “0” in response.
After deactivating plugins one by one, we’ve pinpointed the issue to your plugin. Then we’ve found out the exact piece of code that causes it: https://share.cleanshot.com/6PxwyysfRm1nZxKtq2KL. In v1.3, you started calling plugin_options() on ‘init’ instead of ‘after_setup_theme’. And inside one of the CSF::createSection(), that method calls $this->getPaymentOptions() on line 114. This is the method that breaks everything.
We didn’t dig further, so the only possible explanation we have is from AI:
$this->getPaymentOptions() invokes WC()->payment_gateways->payment_gateways(), forcing early initialization of all WooCommerce payment gateway classes in an AJAX context.
Gateway initialization can trigger side effects: loading files, registering hooks, emitting notices or accidental output (echo). Any unexpected output before the AJAX handler finishes corrupts the expected response format. When the AJAX response is polluted or interrupted, WordPress falls back to returning 0 or a 400 Bad Request.P.S. no, we’re not able to provide you with a sandbox website to experience it yourselves. But I hope that’s enough.
You must be logged in to reply to this topic.