Thread Starter
termi
(@termi)
Oh and I have one more problem
add_action( 'wp_set_object_terms', 'my_function_when_product_category_added', 10, 6 );
This function is triggered when any therm is added not just category and function it is executing adds tags to this post triggering new execution of function making big unnecessary loops.
Is ther any way so this hook is trigered only by categories not by tags or custom taxonomy.
-
This reply was modified 3 years, 4 months ago by termi.
Thread Starter
termi
(@termi)
Thank you for your answers. From what I understand, in the case of wp_insert_post, this function will be triggered every time a post is saved. Is there any other way to execute this function without it taking a long time and causing delays every time a post is saved?