If free shipping is available, you possibly don’t need any other option to be displayed. Here in this snippet, we will see how to disable all the shipping methods except ‘Free Shipping’.Add the following to the function.php in your child theme.
Are you looking for a way to increase the built-in memory limit in WordPress? Well here is the small snippet which can be used to increase the limit. Edit your wp-config.php fileAdd the following to the wp-config.php file. Above the line that says /* That’s all, stop editing! Happy blogging. */ Edit your PHP.ini fileIf
There are many options available for order status but what if our business needs more customized options like Shipment Arrival, Awaiting shipment, or many more. These statuses are necessary to be added according to different business requirements. So The main agenda for this snippet is to see how we can add more information to orders.
Here is the simple one line code to remove zero decimals from product price.
In the below image you can see. By default, WooCommerce displays the title in the H2 tag which can be bigger or smaller according to design. let’s see how we can change the tag with a simple snippet. Here is a useful snippet that makes it easy to change the title tag. Add the following
By default WooCommerce product meta is displayed on the single product page. Such data can reveal a bit about business information and tricks. In the below image you can clearly see the product meta before applying any snippet to it. Now let’s remove the meta from the single product. Here is an easy solution that
This Tab is needed to add additional information to the product so, no information… means no tab. In the below image you can see all the default tabs present in the single product. But what if your customer does not require these tabs to be displayed. Here is the simple snippet which helps to remove
This would sound extraordinary, but in some cases, the quantity field is not needed like when we sell show tickets or movie hall tickets. All the information is already on the product page. So to change the ticket number on the cart page will not be logical.Here we can add this small snippet to fulfill
A website that sells wallpaper images or e-books will not need such fields and company information so this snippet helps to remove the unnecessary fields from the checkout page. In the below image, you can see the default checkout form. Now let’s insert the following to function.php in your child theme. Here in the above
Besides removing all unnecessary fields, adding useful fields to the page is also significant. Use this snippet to add the desired fields on your checkout page. Look below the default checkout form given in the image. Now let’s Add this to your function.php in the child theme. In the above function first, we are forming