AssignDefaultCategory

Class to assign default category to products.


Description Description


Source Source

File: src/Internal/AssignDefaultCategory.php


			

Top ↑

Methods Methods

  • init — Class initialization, to be executed when the class is resolved by the container.
  • maybe_assign_default_product_cat — Assigns default product category for products that have no categories.
  • schedule_action — When a product category is deleted, we need to check if the product has no categories assigned. Then assign it a default category. We delay this with a scheduled action job to not block the response.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.