codeithub
posted a blog.
I had to hide a hidden product from the cart, checkout, order received, and emails. Hidden products are already hidden on the store and category sites, but if they’re added to the cart “programmatically,†they’ll appear in the cart. Simply copy and paste the following snippet into your Functions.php file.
https://www.codeithub.com/hide-hidden-products-from-cart-order-emails/
Be the first person to like this.
codeithub
posted a blog.
This snippet could be really useful for a variety of reasons. Hopefully, you’ll remember me when you need to do advanced customisation of the checkout and its fields.
In today’s snippet, we’ll add a new checkbox and a new “hidden†field — the field will display if the checkbox is checked, otherwise it will disappear.
https://www.codeithub.com/checkbox-to-hide-show-custom-checkout-field/
Be the first person to like this.
codeithub
posted a blog.
Another handy PHP snippet is this one, which inserts the Billing First Name and Billing Last Name to the WooCommerce My Account page’s Registration Form.
This is a fantastic start. You may then add any custom input field to the form, such as dropdowns, radio buttons, and checkboxes, and link them to the relevant WooCommerce user fields.
https://www.codeithub.com/add-first-last-name-to-my-account-register-form/
Be the first person to like this.
codeithub
posted a blog.
Another intriguing Snippet that could be very useful. In the shop / category / tag / loop pages, how do we display product dimensions (height, breadth, and length)? This could be a useful trick for stores that calculate shipping charges depending on volume, or where volume is a crucial piece of information that shoppers must know before advancing.
You can add the following Snippet on your Functions.php.
https://www.codeithub.com/display-height-length-width-on-shop-page/
Be the first person to like this.
codeithub
posted a blog.
Here’s another WooCommerce adjustment to improve your website’s user experience: just in front of the Add to Cart button, add a string that says “Quantity: “. Add the following Snippet to your functions.php.
https://www.codeithub.com/add-quantity-label-in-front-of-add-to-cart-button/
Be the first person to like this.
codeithub
posted a blog.
If an item is on sale, Default WooCommerce displays a “Sale†symbol, but what about displaying the precise sale percentage? You just need to add this Following Snippet on your functions.php.
https://www.codeithub.com/display-discount-on-shop-and-loop-pages/
Be the first person to like this.