A simple, powerful and independent e-commerce platform.
Sell anything with ease.


Code snippets are often a good way to add minor functionality without the need for extra plugins. The code should be added to either the functions.php file in a child theme, or into a utility plugin that you have created specifically for that purpose.

For more on child themes refer to this page: https://www.classicpress.net/blog/creating-a-child-theme/

For instructions on setting up a utility plugin follow this tutorial: https://codepotent.com/utility-plugin-boilerplate-classicpress/

The code samples are divided into five categories:

  • Add or apply snippets add extra functionality.
  • Modify snippets change the way some existing processes work.
  • Remove or hide snippets take away some existing functionality.
  • Redirect snippets send users off to a different destination.
  • Email snippets modify or extend the emails sent out by Classic Commerce.

✓ = tested with Classic Commerce on ClassicPress


…to single product page

Add a ‘Back to Shop’ button on product page ✓

…to category pages

Add short description to category page
Show product dimensions on category page  ✓
Show product weight on category pages  ✓
Add quantity selector to the category page
Display “Out of stock” on category pages
Add “New” badge for recently added items ✓

…to the checkout process

Set a minimum order quantity for checkout
Set a minimum order amount for checkout
Set an order quantity multiple for checkout
Apply a coupon discount for minimum cart total
Apply weight-based shipping options to checkout
Display total weight on cart and checkout pages
Add custom message at payment button
Set discount for bulk buying ✓
Display extra amount needed for free shipping  ✓
Include a ClassicPress page on order received page
Ask for donation in checkout process
Add a payment gateway surcharge to checkout ✓

…on the site

Add country prefix before $ in prices
Add a custom message to the login page
Show default short description if empty
Add prefix to prices ✓
Add suffix to prices  ✓
Add shortcode to make link to individual product ✓


…on the single product page

Remove meta info from the products page
Remove related products section
Remove additional information tab
Remove tags meta box from product data page
Remove “description” heading under single product tab
Disable zoom feature on product page images

…on category pages

Remove dropdown ordering box on category page
Remove result count from category page
Hide product count on category display pages
Remove links to individual products on category page
Hide “read more” buttons for out of stock items

…in the checkout process

Remove fields in the checkout process
Remove product links for
Hide shipping on cart
Hide shipping rates when free shipping is available
Remove “What is PayPal?” link and logo

…on the site

Hide price and cart button for selected categories
Remove breadcrumbs
Exclude products in some categories from the shop
Remove Classic Commerce options from Customizer ✓
Hide custom fields and download boxes on order details ✓
Hide prices and cart buttons if user not logged in ✓
Hide SKUs in frontend only, or completely ✓


…product pages

Change number of thumbnails per row in product gallery
Show out of stock variation selections as grey
Move product tabs beside the product images ✓

…category pages

Order products by price, date or title
Change number of products per row
Change number of products that are displayed per page

…the checkout process

Replace Classic Commerce default PayPal icon
Rename checkout fields
Combine cart and checkout on same page
Deny checkout based on cart weight
Change address checkout fields to textarea ✓
Change postcode/zipcode from required to optional ✓
Simplify checkout if only virtual products
Modify the “no shipping available” message

…on the site

Change text on sale button
Auto complete all Classic Commerce orders
Replace “out of stock” message by “sold”
Change “Add to cart” text when product added to cart
Change any text string in Classic Commerce
Change the breadcrumb separator
Rename “home” in breadcrumb
Show normal price, new price and savings
Extend Classic Commerce order number
Display FREE if price zero or empty
Trim zeros in price decimals


Redirect to front-end after user login
Redirect main shop page
Redirect the home link URL in the breadcrumb


Email admin when a new customer account is created
Add another email recipient when order completed
Add custom content to a specific customer order email
Add custom row to order email table