|
|
hace 1 año | |
|---|---|---|
| .. | ||
| assets | hace 1 año | |
| includes | hace 1 año | |
| languages | hace 1 año | |
| directory-structure.txt | hace 1 año | |
| instructions.txt | hace 1 año | |
| readme.md | hace 1 año | |
| studiou-wc-mandatory-products.php | hace 1 año | |
Version: 1.0.0
A WordPress plugin that extends WooCommerce to add mandatory products to cart based on product categories.
StudioU WC Mandatory Products allows store administrators to define mandatory products at the category level. When a customer adds a product from a configured category to their cart, the mandatory products are automatically added as well.
studiou-wc-mandatory-products folder to the /wp-content/plugins/ directoryThis plugin is compatible with WooCommerce's High-Performance Order Storage (HPOS) feature.
Child categories automatically inherit the mandatory product settings from their parent categories. This makes it easy to set up mandatory products at a high level and have them apply to all subcategories.
Product categories tree:
Products:
Settings:
User Ordering:
When a customer adds a product to their cart, the plugin checks if the product's category (or any parent category) has mandatory products configured. If it does, those mandatory products are automatically added to the cart based on the specified rules.
Mandatory products in the cart are:
The plugin includes basic styles for the frontend, which you can override in your theme's stylesheet.
Developers can use the following hooks to extend or modify the plugin's functionality:
studiou_wcmp_before_add_mandatory_products: Fires before mandatory products are added to cartstudiou_wcmp_after_add_mandatory_products: Fires after mandatory products are added to cartstudiou_wcmp_get_mandatory_products: Filter to modify the list of mandatory products for a given productYes, you can select any product type as a mandatory product, including variable products. However, the plugin will add the default variation if no specific variation is selected.
No, mandatory products cannot be removed directly. They will be removed automatically when the product that triggered their addition is removed.
No, mandatory products will be added with the quantity specified in the category settings, regardless of how many of the main product are added to the cart.
For support requests, please contact us at https://www.quadarax.com or open an issue on our GitHub repository.
This plugin is licensed under the GPL v2 or later.
Developed by Dalibor Votruba (Quadarax)