Tag: Add

  • WooCommerce Checkout Fields and Uploads

    WooCommerce Checkout Fields and Uploads

    If you’re running a WooCommerce payment gateway for your project but you find that you need to add some additional fields to the checkout to keep your client happy, or indeed to placate some law in whichever random country takes their fancy to change the rules of engagement. Of course you could add one of the plethora of plugins out there to do the job, but of course you know and understand the risks of your client having access to that sort of thing whilst you’re not looking.

    To begin with there are two things you absolutely need to understand, adding woocommerce checkout fields into the actual checkout form can be any type apart from ‘file’, if you want to upload anything, then you need to create hooks that exist outside of the checkout_form and add meta data to the order on the fly. You will waste hours of your life trying to find the answer, so save yourself the bother.

    (more…)

  • How to create Custom Coupon Types in WooCommerce

    Coupons are one of WooCommerce’s greatest assets; everyone loves a discount. However, the default types and restrictions may not be exactly what you’re looking for and you may need to extend the functionality. After being recently commissioned to extend the coupon functionality of a stable (all be it old), 2.3.11 installation, finding the right places to hook into WooCommerce to extend the coupon system proved time consuming.

    (more…)