riille
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] woocommerce_is_purchasable filter is fired 5 times!That could work, the only thing is that I’m also basing the purchasablility on the logged in user, so the static list would become very big and complex.
It also feels like that solution would go against best practices in Object Oriented Programming. So the best would be to find a more suitable solution.
Any ideas? Thanks for your time btw!
Forum: Plugins
In reply to: [WooCommerce] woocommerce_is_purchasable filter is fired 5 times!If I understand you correctly it seems like this static variable will be declared and then my code will only be executed for the first loading product in the list and not the others.
I want my custom code to be executed once for every product in the list because my code returns different results depending on the products.
Am I right?
But very much thanks for the answer and I’ll give it a try even tho I might not understand how the static variable will affect the other products.
Thanks for a fast answer!
- This reply was modified 6 years, 2 months ago by riille.
Forum: Fixing WordPress
In reply to: Delete user meta data at user registrationHi again, thanks for your help. You were right. I solved this by delete the user meta data with the code lines I showed earlier at the very first login. At that point the meta data was saved and could be deleted.
Okay, thanks for the information!