Hook Action Pre Publish

DanWood

New Member
Hi there

I need to hook into the publish action that runs when a user uses the chrome extension and presses the "Publish" button.

What im trying to achieve is on a per role/capability for a user when they publish a product using the chrome extension, the hook will change the status to pending review.

I don't know why you designed the plugin to be for Admins only. I have staff, those staff don't need Admin functions.. they do need to add products. Those products and their contents need to be reviewed.

To mitigate work for you guys, it'll be easier to release a doc of functions us developers can hook into and modify before they're pushed to the database. Obviously you obfuscate your code so I can't do this myself....

Cheers
Dan
 

Christina

Administrator
Hi there

I need to hook into the publish action that runs when a user uses the chrome extension and presses the "Publish" button.

What im trying to achieve is on a per role/capability for a user when they publish a product using the chrome extension, the hook will change the status to pending review.

I don't know why you designed the plugin to be for Admins only. I have staff, those staff don't need Admin functions.. they do need to add products. Those products and their contents need to be reviewed.

To mitigate work for you guys, it'll be easier to release a doc of functions us developers can hook into and modify before they're pushed to the database. Obviously you obfuscate your code so I can't do this myself....

Cheers
Dan

Hello, DanWood!

Indeed, the work of AliDropship Google Chrome Extension doesn't depend on the Roles / Users / Capabilities. In addition to the Publish button, there are Import and Add to Import List buttons which allow not to publish products. Your staff can use these buttons.
Anyway, we consider your suggestion. Thank you!
 

DanWood

New Member
I'm sorry but that doesn't really answer my question.

I need to limit staff from publishing completely, I do not want that functionality at all from your chrome extension. You have two other buttons, yes, but I don't want a staff member to be able to publish as we have a strict approval process...

All I need to know is, if I can hook into your function that creates the product and publishes it and what that hook is called. Please.
 

Christina

Administrator
I'm sorry but that doesn't really answer my question.

I need to limit staff from publishing completely, I do not want that functionality at all from your chrome extension. You have two other buttons, yes, but I don't want a staff member to be able to publish as we have a strict approval process...

All I need to know is, if I can hook into your function that creates the product and publishes it and what that hook is called. Please.

Unfortunately, we can't offer you an optimal solution.
 

DanWood

New Member
Unfortunately, we can't offer you an optimal solution.

Really? I mean, it's a WordPress hook right? You're not just inserting straight into the database?

It's not that difficult to explain nor provide a solution for at all.....

I've purchased several license in the past for clients, this case is special needs and ... it is such a simple one to answer...
 

DanWood

New Member
Guess you can't explain how your plugin inserts products into the database then.... that's sad.. Guess you're outsourcing your code to someone else then..
 

Yaros

Moderator
Staff member
Guess you can't explain how your plugin inserts products into the database then.... that's sad.. Guess you're outsourcing your code to someone else then..
Guess you can't understand how it works, but you are right, we can't explain you how our plugin inserts products into database since it does not do it at all. It is WordPress that does it. The product type entries are following the functionality of the post type entries in WordPress. In order to make product entries go first for approval you need to familiarized yourself with WordPress users and their rights, and if you need additional functionality you can search for special solutions/WP plugins developed specially for this purpose.
 

DanWood

New Member
Hahaha so it's a hook then! Just tell me the name of the function you're using so I can hook into it..

Your code is obfuscated and not documented which is why I'm asking, I know you're probably using conventional methods ... but which one how do you expect me to know if you're using a WordPress filter,hook,function or Woocommerce or using the REST API... no need for the smartarsery when my initial question wasn't even answered and there's no documentation...

And yes, even if you use conventional methods it still inserts the product into the database... else it wouldn't exist...... so I don't get what you're trying to prove by being rude.
 

Mar

Moderator
Hahaha so it's a hook then! Just tell me the name of the function you're using so I can hook into it..

Your code is obfuscated and not documented which is why I'm asking, I know you're probably using conventional methods ... but which one how do you expect me to know if you're using a WordPress filter,hook,function or Woocommerce or using the REST API... no need for the smartarsery when my initial question wasn't even answered and there's no documentation...

And yes, even if you use conventional methods it still inserts the product into the database... else it wouldn't exist...... so I don't get what you're trying to prove by being rude.
The guys answer you in a proper manner, in fact it is you who is rude.
 

DanWood

New Member
A user with no publish rights using the chrome extension still publishes the product....

I've even removed all permissions except post edit and it still publishes so go figure.
 
Top