Skip to content

Nayem-Devs Posts

Dokan Multivendor Plugin by weDevs is best plugin to create your marketplace!

Nowadays, an e-commerce website is one of the best ways to earn money. If you are running a business to sell a product or any kind of service then a website is a must for you to get more customer. It would be better if you can have your own e-commerce website from where you can sell your product directly to the customer through the internet.

Hide Coupon Code Field

If your marketplace does not require a coupon functionality or you do not want your user to apply any coupon code then hide the field from everywhere (Cart/Checkout). Now, you can say that “I am not a developer/programmer, how can I do this?”. Please follow my below instruction to do this customization easily and in the proper way.

Adding "Sold Out" tag on the product thumbnail

Many WooCommerce users need this minor feature in their site. Few theme has this feature by default. Today I will show you how to add “Sold Out” tag on the product thumbnail when that product is not available in stock.

Untitled


How to add “SOLD OUT” tag :

You can add this tag by using this action “woocommerce_before_shop_loop_item_title”. I will suggest you to use a child theme to implement this minor feature on your site. I have provided the code snippet below. Just copy those lines and paste them into your wp-content/themes/child-theme/funtion.php file.

add_action( 'woocommerce_before_shop_loop_item_title', function() {
global $product;

if ( !$product->is_in_stock()) ) {
echo ‘Sold Out‘;
}