The module sets the last product category as default
For example, if you use scripts to update or import products and you need to set the last category in the product category tree as the default, you only need one click and the module will solve everything for you.
The module also includes the option to change the default product category individually by adding the code: Ps8ModProductCategoryDefault::setProductCategoryDefault($id_product)
anywhere in your script or external module.
The $id_product parameter is the ID of the product for which you need to set the default category as mentioned above.