Add a surcharge to cart and checkout – uses fees API
- Add a basic surcharge to all transactions: https://gist.github.com/b98e50e29acbd8f7b13cac4217692810
- Add a surcharge based on the delivery country: https://gist.github.com/47c3a4f6fc0d9efa672922ac1b3e7fd2
Customize the WooCommerce breadcrumb
- Change the home text: https://gist.github.com/b59ba7520e2c166795609b36be823b86
- Change the breadcrumb separator: https://gist.github.com/be5642df6a37da38fb8add70d5788a1c
- Change the home text:
- Change the home text:
- Change the home text:
- Change the home text:
- Change the home text:
Automatically Complete Orders (functions.php)
Add a message above the login / register form (functions.php)
Allow HTML in term (category, tag) descriptions (functions.php)
Change the default state and country on the checkout (functions.php)
Override loop template and show quantities next to add to cart buttons (functions.php)
Custom tracking code for the thanks page (functions.php)
Make address fields wider (functions.php)
Exclude products from a particular category on the shop page (functions.php)
Set a custom add to cart URL to redirect to (functions.php)
Custom sorting options (asc/desc) (functions.php)
Make price widget draggable on touch devices (functions.php)
Editing product data tabs (functions.php)
Hide sub-category product count in product archives (functions.php)
Remove product content based on category (functions.php)
Access WC variables (functions.php)
//* Get global WC object
global $woocommerce;
//* Access various WooCommerce cart variables, see also https://docs.woothemes.com/wc-apidocs/class-WC_Cart.html
$woocommerce->cart->get_cart_subtotal();
$woocommerce->cart->get_cart_tax();
$woocommerce->cart->get_cart_total();
//* Access various WooCommerce customer variables, see also @see https://docs.woothemes.com/wc-apidocs/class-WC_Customer.html
$woocommerce->customer->get_country();
$woocommerce->customer->get_default_country();
$woocommerce->customer->get_shipping_country();
Forward all WC email notifications (functions.php)
//* Forward all WC email notifications
add_filter( 'woocommerce_email_headers', 'nl_forward_wc_email_notifocations', 10, 2);
function nl_forward_wc_email_notifocations($headers, $object) {
$headers = array();
$headers[] = 'Bcc: Niels Lange <[email protected]>';
$headers[] = 'Content-Type: text/html';
return $headers;
}