Articles of hooks

Remove Woocommerce product link

I’d like to remove the link from the Woocommerce product listings. I don’t need the user to see the product detail pages, we are going to use Quick View instead. Anywho, I have been searching and everything I’ve found is outdated. This is the current content-product.php file: https://github.com/woothemes/woocommerce/blob/master/templates/content-product.php and there are no anchor tags to […]

Can user_register output the password?

I’m trying to output the password of a newly created user in plain text using the user_register hook as explained in this answer. However, upon doing a var_dump of $_POST, I don’t see any password output. Can user_register actually do this? If not, might you have any ideas on a hook that would do this […]

Disable delete user

My site has custom post type ‘Portfolio’. If a user has at least one Portfolio, how can I disable the option to delete that user? I found the action/hook delete_user, but it doesn’t seem right for this issue.

OOP: Display warning and deactivate the plugin if PHP version is less than 5.4

I want to show a notice to the user and deactivate my plugin, using OOP code style, if the user has a PHP version less than 5.4. The code works fine when I create my plugin using non-OOP. It shows an warning to the user and deactivate the plugin and prevents user from activating the […]

What's the earliest point I can get the queried object ID?

I’m writing a supplement plugin to WordPress Mobile Pack because I would like to use the default theme on pages that are assigned a certain page template. My plugin will only deal with the mobile switcher portion of that plugin, so the other components can be ignored (I think). Looking at the source for wpmp_switcher.php, […]

How do I successfully create a hook for an email override?

I’m creating an online apartment rental application using Visual Form Builder Pro. I need to have completed forms go to certain managers based on the property selection. Once a user selects a property location and submits the form, it must be routed via email to the appropriate apartment manager. For example, I choose Arlington Arms […]

Security around save_post hook

There are a lot of examples using the save_post hook, that include adding and verifying a nonce, and checking the user has appropriate permissions before you continue. Is this necessary? When updating/publishing a post, WP verifies the normal nonce, and checks permissions itself, redirecting to a 403 or ‘Are you sure you want to do […]

Update meta values with AJAX

I am working on a voting system in WordPress. I first made it with GET requests but someone told me you should not use GET for this, So I started working with AJAX to update custom fields/meta values, after reading this article. I’ve read a lot of the documentation from jQuery and WordPress AJAX pages […]

Built in admin ajax hooks?

I’m developing a plugin and using regular hooks and filters. However, I’m now trying to bind my function to responses from WP’s admin ajax calls. For example, in the Plugins Add New screen I would like to run my function after ajax installation of a plugin is complete successfully and the “Activate” button appears. How […]

Over write plugin templates

Is that possible for overwriting a plugin templates via making a folder in theme file and copy the file in that folder and altering the content [both folder and file name have the same name as arranged in plugin ]. Generally we altering the woocommerce page templates by following these system .Is that possible for […]