This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Cart route being loaded in editor #8244
Labels
block: cart
Issues related to the cart block.
focus: performance
The issue/PR is related to performance.
type: bug
The issue/PR concerns a confirmed bug.
Describe the bug
Even without any WooCommerce blocks in content, the speed of the editor seems to be affected by WooCommerce blocks.
On a project I'm working on, I hooked into
woocommerce_check_cart_items
. I never expected that using that filter would be triggered back-end.This makes me wonder. How much non-needed logic is processed in the editor. Worst case, will editor performance now be affected by the number of products in your cart session?
To reproduce
Log in to admin, go to the edit screen of any page / post
Add this piece of code to your functions.php / a custom plugin
Expected behavior
I would not expect this logic to affect the editor, at least not when the editor does not even contain any WC block
Environment
WordPress (please complete the following information):
The text was updated successfully, but these errors were encountered: