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 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
Security

Hide the WordPress Version Number

Strips the WordPress version string out of your site's <head>, so it's not sitting in plain sight for anyone scanning your site for a known vulnerability tied to a specific version.

View snippet
Security

Lock Down the Theme & Plugin File Editor

Turns off the built-in code editor under Appearance/Plugins in wp-admin, so nobody can edit theme or plugin files straight from the dashboard — a common target once an account gets compromised.

View snippet
Others

WordPress Pretty Permalinks .htaccess Rules

The standard rewrite block WordPress relies on for "pretty" permalinks — it routes any request that isn't a real file or folder through index.php so WordPress can handle the URL itself.

View snippet
Others

A Baseline robots.txt Setup for WordPress

A starting-point robots.txt for a typical WordPress site — it keeps your uploads crawlable, keeps search engines out of the folders and pages that don't need indexing, and points crawlers to your sitemaps.

View snippet