How to properly use a hook to create template for custom product type in a plugin such as Woocommerce? [closed]

You may use an action in the format woocommerce_YOUR_PRODUCT_TYPE_add_to_cart to reach the goal. Here is the example. The following code is for putting in functions.php, if you are writing a plugin. Please remember to change the callback. eg. you have a product type called Special, you want to add the add-to-cart template for it. add … Read more

How to use a frontend URL with a Plugin

Must exist a real page in WordPres? Yes, you need to create a page, but it doesn’t have to have any content. Let’s say you created a new page named ‘Confirmation message’. The URL would be http://example.com/confirmation-message. Now add the following to the functions.php of your theme: /** * Adds a confirmation message to the … Read more

WordPress 2.8 Widget API is suitable for Worpress 3.1.4 plugins development?

WordPress APIs usually refer to group of functions and concepts and are not versioned. Any versions refer to WP itself (or in some cases to bundled components, developed by third parties such as jQuery). In WordPress version 2.8 creating widgets was refactored from older code (which you shouldn’t care about) to newer class-based code (which … Read more