Here’s what we’re making This post assumes that you have some basics about getting set up in a block-building environment. So we are going to use following to scaffold an example plugin with block scripts all ready to start: After that’s installed you will want to start watching the files by navigating to that new…
WooCommerce supports many core properties when fetching a product via the REST API. In this tutorial, we’ll explore three code snippets that extend WooCommerce product responses, allowing for the retrieval and updating of custom fields and metadata. 1. Adding Custom Fields to Product Schema The first snippet focuses on modifying the product schema, defining additional…
Anybody who follows me on Twitter knows that I am always, and I mean, always fighting the build tools. Things that are supposed help us automate tasks and make life easier, frequently are hard to set up, break, and generally cause me a lot of stress. So when I figured out how to have Grunt…
Sometimes you need to send WooCommerce emails to more people than you can do via the main plugin settings. Or, you need to quietly BCC somebody, like a vendor, etc. You can achieve that by modifying the email headers on the woocommerce_email_headers filter. To achieve this you can add the following snippet to your theme’s…
Since I developed the WooCommerce Name Your Price plugin back in 2012, entrepreneurs have used it to sell all kinds of products all around the world! But over the years, one question I’ve gotten about my plugin is why a business would ever let a customer decide what to pay! I’m also a business owner,…
WooCommerce Name Your Price version 3.0 features a total rewrite of the front-end validation scripts. We’ve streamlined the user experience, improved function for hidden minimum prices, provided accessibility for users of screen readers, and the same reliable compatibility with a broad range of product types and plugins.
UPDATED 9/29/2019: Noticed some code typos and updated some of the display sections for compatibility with WooCommmerce 3.7. In this WooCommerce tutorial I will be showing you how to add a custom field to the front-end of a WooCommerce product. We’ll be adding a text input that a customer could use to enter some special…
I’ve expanded on the code I posted in my tutorial on how to customize the WooCommerce Checkout. First you need to register the new checkout fields. This is where I’ve added a current_user_can() to test if the current user has the appropriate capabilities to see these extra fields. I’m using the manage_options capability because it…