PHP function to unpublish all products for a specific user role (woocommerce)


The project should be relatively simple for a php developer.

I need a php function to unpublish all products for a specific user role in woocommerce (wordpress). I want to put the function in my child theme [login to view URL] file.

On my Wordpress site users can change user roles. Once a user role is changed (to subscriber), I want all the products belonging to this user to become unpublished.

Basically make all the products that the user published before to unpublished.


Skills: PHP, WordPress

See more: document manager php user role, php function compare products, wordpress user photo php function, tweets specific user using api php code, we are looking for a sas programmer for our pharma client in germany frankfurt for contract role duration of the project is 12 m, how to create login page that redirects based on user role in php, creating multi user role based admin using php mysql, multi user role based login in php with mysql, multi user role based login in php with mysql source code, onesignal send notification to specific user php, php user role management system, woocommerce hide price user role, edit functions.php wordpress child theme, edit functions php wordpress child theme, multi user role based login in php with mysqli, wordpress child theme override php file, describe how critical the role is for the project, wordpress child theme functions.php example, php file on wordpress, maximum products per user for woocommerce pro

About the Employer:
( 0 reviews ) Munich, Germany

Project ID: #31046644

Awarded to:


Hi, I can do it perfectly and can finish within a short time. Feel free to contact me on chat for more discussion ... Looking forward to your reply. Regards, Nand

€15 EUR in 1 day
(128 Reviews)

7 freelancers are bidding on average €24 for this job


Hello I am expert wordpress developer and i can do this unpublished task according to user role so please message me for this task Thanks

€35 EUR in 2 days
(328 Reviews)

Hello employer, I am a 7+ years experienced web programmer specializing in almost all php cms(Word, Joomla, Drupal, Magento) / frameworks (Laravel, CODEIGNITER, CakePHP, symphony) and full stack technologies (Angular More

€29 EUR in 2 days
(25 Reviews)
(25 Reviews)

Hi! I am skilled Full stack software engineer with skills including HTML,CSS,Bootstrap,PHP,Laravel,MySQL,jquery,Javascript,wordpress,Shopify (Shopify Templates),Woo Commerce ( Woo Commerce themes),E-commerce focused So More

€19 EUR in 7 days
(8 Reviews)

Hi, I hope all is well with you. I have read the job description. I find it a perfect match for me as I have extensive hands on experience in Web Development. I have developed a lot of websites and stores using Word More

€30 EUR in 4 days
(1 Review)

Hi I read your project description for website development and am sure I can give you quality work. I have expertise in web development. And I will make it at your given price and time. I'm an experienced web develope More

€12 EUR in 2 days
(0 Reviews)