How To Add A Wishlist Button To Your WooCommerce Product With YITH Wishlist Plugin

When shopping online, the wishlist is a important as the cart, maybe more important. The function of the wishlist is to store the items that the customers/visitors want to have but don’t or can’t purchase at the moment. Woocommerce is a great tool to get your online store up and running but it doesn’t come with a wishlist button built-in. Further more, if you want to use the wishlist solution from WooCommerce’s developer, you need to pay for their plugin. Well, if all you need is a tool that:

  1. Allows you to add a Wishlist button to your product page
  2. Displays the wishlist of the shop visitor
  3. Has no limit on how many products your visitors can add to the wishlist

Then a free solution like YITH wishlist plugin is the right choice for you.

How to download  YITH wishlist plugin

The plugin is freely available at WordPress.org here. You can also download it from your admin dashboard.

How to use the YITH wishlist plugin to create your own wishlist

Upon activation, the plugin will create a wishlist button for you. As you can see in the image below, the link called “Add to wishlist” was added to my product page by YITH Wishlist plugin. The link is not fancy but surely it does the job. When you click on that link, that product will be added to the wishlist and there is a link for you to view the current wishlist. Notice that in the free version, there is only one wishlist available. If you want to have multiple wishlists for your visitors, consider upgrading to the pro version.

Now, the plugin is fully functional at this moment. If you are happy with the current result, you can stop here. However, there are some valuable customization you can make the improve the experience much more.

Customizing YITH wishlist plugin

We will start with by how to change your wishlist page. By default, YITH Wishlist Plugin will create a page for you. However, you can create a new page and set it to the wishlist page if you need too. In order to do that, first, create a page with the following content:

[yith_wcwl_wishlist]

As in my case, I created a page (not post) called My Wishlist:

After that, we need to go to YITH plugins->Wishlist (in your dashboard). You will see a section called Wishlist Page. Clicking on the select box to select the page you created with the wishlist shortcode above ([yith_wcwl_wishlist]).

The next time your visitors view their wishlist, they will see that page.

As you can see, creating a wishlist button/page for your Woocommerce store is not hard at all. YITH wishlist plugin offers basic functionalities that fit most of store owner. If you want to improve the wishlist experience further, you may consider getting your hand dirty with CSS/Javascript or hire a developer to customize the look and feel of the button and the wishlist page.

 

 

How To Disable A Shipping Method In Woocommerce

WooCommerce comes with a few shipping methods and with plugins, you can add more. So, you can have literally unlimited shipping options.  Having multiple shipping methods seems to be a good thing since it gives the customers more options. However, if you know that your customers will use only a certain shipping methods, having more than that can cause confusion.  In this post, we are going to find out how to disable a shipping method in Woocommerce so your customers will have only the methods that suit them.

How To Disable A Shipping Method In Woocommerce

First, go to Woocommerce->Settings and click on Shipping.

woocommerce shipping screen

In the first screen, you can see the list of shipping zones. If you don’t know what shipping zones are, they are the area you can define to apply different shipping policies. This is a very nice option of WooCommerce. For example, you want to apply free shipping in Asia and a flat rate $10 in Europe, you can add two zones Asia and Europe and apply the appropriate shipping methods to those zones.

Now, one zone can have multiple shipping method. For example, my customers in Asia will see this when they checkout:

Pretty confusing, right? Now, I would like to remove the Free shipping option, here is what I’ll do:

  1. Click on the shipping zone I want to modify its shipping methods, in my case, I will click on Asia.

As you can see, all the options are listed in the next screen. To disable any shipping method, simply click on the toggle button to turn it off. Here, I’m going to turn off free shipping. Don’t forget to click on Save changes.

If I go and check the checkout page now, the Free shipping method is no longer available:

That’s it! Now you know how to enable and disable a shipping method for a particular zone in Woocommerce. Thanks for reading and if you have any comments, please leave it below.

How To Add New Currency To WooCommerce

Woocommerce comes with quite many currencies. In fact, if you are selling items internationally, you got a plenty of options to choose from such as USD, GBP, EUR or even BTC (bitcoin). However, there are a lot of currencies isn’t in that list. For example, what if you want to accept ETH (Ethereum) as your currency? Don’t worry, we can make that work.

Check if your currency is supported by Woocommerce

Woocomemerce is updated frequently. Thus, chances are your currency get added in the latest release. The first thing you need to do is to:

  1. Update Woocommerce to the latest version
  2. Go to Woocommerce->Settings->General->Scroll to the bottom to see the currency options. You can see the list of supported currencies there

If your desired currency is in the list, that’s great! You don’t need to do anything else. If it isn’t, read on.

Introducing the necessary hooks

If you are unfamiliar with the term hooks, you can take a look at the official document here. However, it is not necessary to understand it thoroughly to add new currencies to Woocommerce.

There are two filter hooks you need to use to add new currency to Woocommerce

  1. woocommerce_currencies
  2. woocommerce_currency_symbol

As the names suggest, the first one will be used to register new currency and the second one will be used to register the currency’s symbol.

The actual code

I’m going to register the Ethereum currency to Woocommerce. However, you can define and add any type of currency you want. You can even invent a currency that isn’t available right now.

add_filter( 'woocommerce_currencies', 'bc_add_new_currency' );
add_filter( 'woocommerce_currency_symbol', 'bc_add_new_currency_symbol', 10, 2 );

function bc_add_new_currency( $currencies ) {
     $currencies['ETH'] = __( 'Ethereum', 'your-theme-text-domain' );
     return $currencies;
}


function bc_add_new_currency_symbol( $symbol, $currency ) {
     
     if( $currency == 'ETH' ) {
          $symbol = '♦';
     }
     return $symbol;
}

There are a few places in the code above you need to pay attention to:

  1. The symbol of ETH is ♦. You can replace this with your currency’s symbol .
  2. Name of your currency. In the code, it is “Ethereum”. You can change this to the name of your currency. For example: Bitcoin Cash
  3. The index key ‘ETH’. This can be anything but unique across all currencies.

Now, after you modify the code to match your currency of choice, put it at the end of the functions.php file in your active theme folder:

The result

Now, if you go to Woocommerce->Settings->General and scroll down to Currency Options, you can search for the new currency:

That’s it! That’s how you can add new currencies to Woocommerce. You can add as many new currencies as you want, there is no limit.