Codes for Woocommerce checkout page customization and others

If you have built an e-commerce site using WordPress and Woocommerce plugin, then here are some of the useful codes for Woocommerce customization. We will not use any third-party plugins to make the modification. These codes will customize or modify the fields on the checkout page, change some URLs and some default text that comes from the Woocommerce plugin.

Price Shortcode

The price shortcode for woocommerce will enable you to display the price of the product on any pages or posts just by using the shortcode. This code goes to functions.php

Add to cart link

Using this code you can directly send the customer to the cart page (avoiding the view cart) and as well remove the message (the product has been added to the cart). You will also find the link to use add to cart on any text or button.

Add to cart text:

If you are looking to change the default “ADD TO CART” text on Woocommerce, then the following code can do the trick. Please use only ONE code, depending on if it’s a single product or otherwise.

Skip view cart, directly go to Cart Page or Checkout Page (after clicking Add to cart button)

Now if you don’t want your visitor or buyer to stay on the same page, and click on view cart, and then proceed to payments to the checkout page, using the codes below can directly send your customer to Cart Page or the checkout page directly. Please use only ONE code of the two as per your requirements.

Back to shop text & its URL

You can change the default Back to shop text to anything you want. This will be helpful if, for instance, you sell something else. Like if you sell plugins then Browse plugins would be more appropriate. Additionally, you can also change the /shop page link to any other links you want to send.

Remove fields from the checkout page

Depending on your needs and requirements, you can choose to remove the fields from the Billing address and shipping address. Not everyone requires the full details of address (especially if you are selling digital products), Name / Email and the phone should suffice.

You can completely remove the shipping details or some fields with the codes below.

Place order text

While using a Stripe payment gateway, you might see PLACE ORDER after selecting stripe as the payment method. If you want to change this default text to something else like Buy Now, using the following codes you can easily do it.



Welcome to Hey, Let's Learn Something!

Please sign up here to receive the latest updates on our blogs, tutorials and download section :)

Thank you for subscribing :)