Skip to main content
added 456 characters in body
Source Link

In the context of WooCommerce products does anyone know of a way to prevent a user from

  1. Saving Draft

  2. Updating an existing post

  3. Publishing

  4. Submitting for review

IF specific WooCommerce product data fields have not been filled in or any other field for that matter?

It's easy to create MetaBox.io custom fields and set them to be required, but I want to get control over the native Woo and FooEvents fields among other fields such as Post Title, Post Content, Featured Image, etc.

I’ve been playing with a “Save_Post” action hook but having some trouble with it preventing a user from doing any of the 4 actions above. enter image description here I managed to get this much to show up but because of the "redirect" issue related to the save_post hook, the admin notices and the css show up when I "add a new product" which is annoying. Still, I want to be able to prevent the save until these items are filled. Once I figure this out, I think I might be able to take it further with the Woo and FooEvents fields.

In the context of WooCommerce products does anyone know of a way to prevent a user from

  1. Saving Draft

  2. Updating an existing post

  3. Publishing

  4. Submitting for review

IF specific WooCommerce product data fields have not been filled in or any other field for that matter?

It's easy to create MetaBox.io custom fields and set them to be required, but I want to get control over the native Woo and FooEvents fields among other fields such as Post Title, Post Content, Featured Image, etc.

I’ve been playing with a “Save_Post” action hook but having some trouble with it preventing a user from doing any of the 4 actions above.

In the context of WooCommerce products does anyone know of a way to prevent a user from

  1. Saving Draft

  2. Updating an existing post

  3. Publishing

  4. Submitting for review

IF specific WooCommerce product data fields have not been filled in or any other field for that matter?

It's easy to create MetaBox.io custom fields and set them to be required, but I want to get control over the native Woo and FooEvents fields among other fields such as Post Title, Post Content, Featured Image, etc.

I’ve been playing with a “Save_Post” action hook but having some trouble with it preventing a user from doing any of the 4 actions above. enter image description here I managed to get this much to show up but because of the "redirect" issue related to the save_post hook, the admin notices and the css show up when I "add a new product" which is annoying. Still, I want to be able to prevent the save until these items are filled. Once I figure this out, I think I might be able to take it further with the Woo and FooEvents fields.

Source Link

Make Admin Side Fields Mandatory/Required

In the context of WooCommerce products does anyone know of a way to prevent a user from

  1. Saving Draft

  2. Updating an existing post

  3. Publishing

  4. Submitting for review

IF specific WooCommerce product data fields have not been filled in or any other field for that matter?

It's easy to create MetaBox.io custom fields and set them to be required, but I want to get control over the native Woo and FooEvents fields among other fields such as Post Title, Post Content, Featured Image, etc.

I’ve been playing with a “Save_Post” action hook but having some trouble with it preventing a user from doing any of the 4 actions above.