Free to use

Code snippets

Small, ready-to-use pieces of PHP, JavaScript, and WooCommerce code from real client projects — copy them straight from the page, or grab the full file on GitHub.

WooCommerce

Add a Custom Post Type Through WooCommerce

Lets a non-`product` post type behave like a purchasable WooCommerce item — pulling its price from a custom field and giving it a working "Add to Cart" button, without converting it into an actual Product post type.

View snippet
WooCommerce

Reorder (and Rename) the My Account Menu Tabs

Controls the exact order the tabs appear in on the WooCommerce My Account page, and lets you rename any of them at the same time — including slotting in a custom tab you've added elsewhere.

View snippet
WooCommerce

Add a Custom Tab to the WooCommerce My Account Page

Registers a brand new endpoint (in this example, "Premium Support") and adds it as its own tab in the My Account menu, complete with its own content area — the standard pattern for extending My Account with anything WooCommerce doesn't ship by default.

View snippet
WooCommerce

Shortcode: Show a Customer’s Purchase History as a Product Grid

Registers a `[my_products]` shortcode that looks up everything the logged-in customer has ever bought (completed or processing orders) and renders it as a normal WooCommerce product loop — useful for a "buy again" section on the My Account page.

View snippet
WooCommerce

Custom Notice on the WooCommerce Login/Registration Form

Drops a custom message above the login and registration form on the My Account page — handy for a promo note, a heads-up about registration requirements, or just a friendlier welcome.

View snippet
WooCommerce

Hide Specific Tabs on the WooCommerce Product Page

Removes the Description, Reviews, and Additional Information tabs from a product page — common when a product's details are already covered elsewhere on the page and the default tabs just add clutter.

View snippet
WooCommerce

Add $X More for Free Shipping” Cart Notice

Checks the customer's cart against your lowest configured free-shipping threshold across all shipping zones, and shows a notice on the cart page telling them exactly how much more they need to spend to unlock it. Tested against WooCommerce 3.0.5.

View snippet
WooCommerce

Override How a Currency Symbol Displays in WooCommerce

Some currencies don't have a widely-recognized symbol, so WooCommerce falls back to something unclear. This swaps in a custom symbol for a specific currency code instead — the example below covers Bulgarian Lev (BGN).

View snippet