Skip to content
Woo | Developer Blog
  • Get started
  • Stay updated
    • Roadmap Insights
    • Changelog
    • Release downloads
    • Newsletter
    • WooCommerce Meetups
    • Join the Community Slack
  • Grow with Woo
    • Become a Woo agency partner
    • Become a Marketplace partner
    • Contribute to WooCommerce
  • Docs

Frontend Snippets

  • Apply a coupon for minimum cart total

    Apply a coupon for minimum cart total

    Automattic Avatar
    Automattic

    |

    Jan 21, 2019


    The code snippet below allows you to: Requirements: Add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as… Read more

  • Add a message above the login / register form

    Add a message above the login / register form

    Automattic Avatar
    Automattic

    |

    Oct 1, 2013


    Add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Please don’t add custom… Read more

  • Customize the WooCommerce breadcrumb

    Customize the WooCommerce breadcrumb

    Automattic Avatar
    Automattic

    |

    Jun 24, 2013


    You need to add code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Please don’t… Read more

  • Add a surcharge to cart and checkout – uses fees API

    Add a surcharge to cart and checkout – uses fees API

    Automattic Avatar
    Automattic

    |

    Jun 13, 2013


    Add code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code directly… Read more

  • Remove product content based on category

    Remove product content based on category

    Automattic Avatar
    Automattic

    |

    Mar 16, 2013


    Add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code… Read more

  • Hide sub-category product count in product archives

    Hide sub-category product count in product archives

    Automattic Avatar
    Automattic

    |

    Mar 14, 2013


    Add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Please don’t add custom… Read more

  • Editing product data tabs

    Editing product data tabs

    Automattic Avatar
    Automattic

    |

    Mar 11, 2013


    You need to add the code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Please… Read more

  • Make price widget draggable on touch devices

    Make price widget draggable on touch devices

    Automattic Avatar
    Automattic

    |

    Feb 27, 2013


    Resources Grab this script and save it to the JS folder in your theme directory. Installation Add code to your child theme’s functions.php file or via a plugin that allows… Read more

  • Change the default state and country on the checkout

    Change the default state and country on the checkout

    Automattic Avatar
    Automattic

    |

    Jun 22, 2012


    Add code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code directly… Read more

  • Override loop template and show quantities next to add to cart buttons.

    Override loop template and show quantities next to add to cart buttons.

    Automattic Avatar
    Automattic

    |

    May 26, 2012


    To display quantity input fields for simple products within your shop archive pages, use the following code: https://gist.github.com/woogists/c5e5d73bb4d7d44f5642313b8094937c [box type=”note”]You will need to add this code to your child theme’s… Read more

  • Allow HTML in term (category, tag) descriptions

    Allow HTML in term (category, tag) descriptions

    Automattic Avatar
    Automattic

    |

    Apr 27, 2012


    Add code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code directly… Read more

  • Custom tracking code for the thanks page

    Custom tracking code for the thanks page

    Automattic Avatar
    Automattic

    |

    Feb 16, 2012


    This snippet is for adding tracking for a separate piece of analytic software you may have installed. The order object contains all the order data you should need, including line… Read more

Next Page→

Updates

  • Changelog
  • Release Packages
  • Release Calendar
  • Newsletter
  • Status

Information

  • About
  • Contact Us

Community

  • Community Slack
  • WooCommerce Meetups
  • GitHub Discussions
  • Community Forum
  • Code of Conduct
  • Community Participation Guide

Grow with Woo

  • Become a Woo agency partner
  • Become a Marketplace partner
  • Contribute to WooCommerce

Never miss an update

Subscribe to the Newsletter
An thingamajig

Terms and Conditions

Privacy policy

Privacy Notice for California Users