Code Snippets
Instructions on how to add code snippets can be found Here
RETIRED – Send coupons used in an order by email
This snippet sends by email the list of coupons used in an order. You can customize the โ$toโ variable and define your own email address, and the โ$messageโ to have...
Minimum Order Amount
Theย WC Minimum Order Amount plugin is based on this snippet. As an alternative, the Min/Max Quantities for WooCommerce extension allows you to set up minimum and maximumย Order quantityย andย Order valueย rules underย WooCommerce...
Customize the WooCommerce breadcrumb
With Yoast SEO, it is possible to add breadcrumbs to single posts and pages. You can do that with theย breadcrumbs block. There are options for changing the separator between breadcrumbs,...
Automatically Complete Orders
This code snippet is no longer available. Theย WooCommerce Order Status Controlย extension gives you control over which types of paid orders should be automatically placed in Completed status.
Custom sorting options (asc/desc)
This example code shows how you can add an order option for โrandomโ, but this also works in similar ways for other ways to order your products on the catalog...
Change the default state and country on the checkout
Note that theย default_checkout_billing_country filter affects both existing and non-existing users.
Override loop template and show quantities next to add to cart buttons
To display quantity input fields for simple products within your shop archive pages, use the following code:
RETIRED – Allow HTML in term (category, tag) descriptions
By default, WordPress strips HTML from category descriptions. This code will prevent that from happening.ย The first part prevents HTML from being stripped from term descriptions.ย The second part prevents HTML being...
- « Previous
- 1
- 2