How To Disable Magnifying Glass Effects On WooCommerce Products’ Images Without Using Plugin

If you go to any stores, you can find that if you hover the product’s images, there is a magnifier appears to help you view the products better. WooCommerce supports this feature too. However, I personally don’t like the default effects of WooCommerce:

Original image:

woocommerce original image

Product image on hover:

woocommerce with magnifier when hover

So, if you are like me, you may wonder: how can I disable this effect? It turns out very simple.

How To Disable Magnifying Glass Effects On WooCommerce

Now, all you need to do is to go to Appearance -> Editor and put the following code at the bottom of your functions.php file

add_action( 'after_setup_theme', 'bc_remove_magnifier', 100 );

function bc_remove_magnifier() {
remove_theme_support( 'wc-product-gallery-zoom' );
}

If you view the product image now and hover over the image, the effects are now removed.

Conclusion

As you can see, if you don’t like the default behavior that WooCommerce gives to products image on being hovered, removing it is quite simple. This tip is also useful if you are making a custom plugin to add a better magnifying effect to the products’ images.

How To Setup Buy 3 Get 1 Free In WooCommerce

You are a store owner and you want to run a promotional campaign that gives your customer one product for free for every 3 (or any other number) items they buy in a single order. Obviously, WooCommerce doesn’t support this kind of setup by default. Luckily for us, there is a plugin that does this job really well. That’s a plugin called Woo Discount Rules Pro.

Obviously, there are more discount rules you can setup using this plugin but we only focus on the buy x get y items for free in this post.

How to setup buy 3 get 1 for free using Woo Discount Rules Pro

Now, I suppose that you have the plugin installed and activated. Let’s go to WooCommerce->Woo Discount Rules:

accessing woo discount rules

You will see an interface like this:

woo discount rules pro interface

Our next step is to create a rule since we don’t have any rule here.

Let’s enter the details as above. Since we don’t have any rules yet, the priority box can be set to any valid number (positive). The validity field is where you can set at which period that this rule is effective. It’s all up to you to set this period. Now, let’s click next to the next screen.

create rules second screen

All fields in this screen are quite explanatory. It allows you to further customize the rule. For example, you can set this rule to be applied to customers who previously purchased from you (subtotal or number of items). You can also set the minimal subtotal of the current order to active the rule…

For now, we are going to apply the rule to all products (though you can add some products to the exception list if you want to).

Let’s click next to get to the last screen:

add the discount range

Let’s click on Add new range:

setup buy 3 get 1 free rule

Now, you can see that I’ve setup the rule to buy 3 (min quantity) so the customer can get one item of the same product for free. You are not limit to the item of the same product, in fact, you can have a bunch of options as demonstrated below:

You can see that, there are many options that you can customize to match your exact needs.

Now, I click on Save rule (located at the top).

See the buy 3 get 1 for free rule in action

Now, I’m going to buy 3 item of a single product. Let’s see the rule in action:

buy 3 get 1 free coupon woocommerce

As you can see, the rule displayed on the product page and when you view the cart, the subtotal is counted for only two products.

Conclusion

Woo Discount Rules Pro is not a free plugin but it add much more flexibility to your shop. It can also help you create loyal customer program (that rewards customers who previously bought products on the shop). If you are running a store, this is one discount rule plugin that you should have.

Thanks for reading the post. Make sure you check other WooCommerce Tips to help you build better eCommerce sites.