Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › Product validation not working in bulk edit
Tagged: BULK Edit, product import, store manager, validation
- This topic has 3 replies, 2 voices, and was last updated 4 years, 9 months ago by WCFM Forum.
- AuthorPosts
- January 30, 2020 at 9:56 pm #104727bcansParticipant
1. Go to /store-manager/products
2. Click “Add New”
3. Enter a title for the new product
4. Click on “Draft” at the bottom of the page
5. Go back to /store-manager/products
6. Click on the checkbox next to the new product draft
7. Click on “Bulk Edit”
8. Change “Status” to “Published”
9. Click “Update”The product is successfully published despite not having required fields filled in (price, description, etc).
Is there any way to enforce validation here? Having a similar issue for the CSV product import as well. - February 6, 2020 at 12:02 pm #105692WCFM ForumMember
Hi,
Well, Bulk edit works differently than product normal edit.
Suppose for price, bulk edit provide option to increase/decrease price by percent – https://ibb.co/TM1dZCq
Now, what validation we will enforce here? It will not be right to enforce increase/decrease for bulk update!
Thank You
- February 6, 2020 at 12:13 pm #105695bcansParticipant
Now, what validation we will enforce here?
Validation for required fields missing. Right now I can bulk edit multiple products that are drafts and publish them despite not having required fields (e.g. price, description, etc).
- February 10, 2020 at 2:02 pm #106395WCFM ForumMember
Hi,
Well, in that case add this line to your site –
add_filter( 'wcfm_is_allow_bulk_edit_status_update', '__return_false' );
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/Now, vendors are allowed to bulk edit products, bot not allowed to change product status form there! So they will not able to publish products without going though validation.
Thank You
- AuthorPosts
- You must be logged in to reply to this topic.