is live

We at Shtrak have been working lately on a WordPress and WooCommerce based platform for online shops.
You can create your eCommerce site for free on

Let me know what do you think about our service – I’m open to any ideas for improvement!

Update to WooCommerce 2.0 and missing information for the product (in the front-end)

WooThemes released the new WooCommerce 2.0 recently and updating seems really charming with the new interface and other listed features.

However sometimes updating won’t be the best thing you can do if your theme is made for 1.6.

In non-technical words – if after the update some of the information is missing or is wrong when seeing it in the front-end this is most related to the theme.

The problem here is that many theme developers (even WooThemes themselves) are using the WC_Product to get the product’s data. The problem is that you can no longer create an instance of WC_Produc by post ID. This is probably related to the new function get_product() which I think is really poorly documented in their official docs for some thing to put in the new release information.

In my case for a theme made from WooThemes themselves I had:

//inside the loop
$_product = &new WC_Product( $loop->post->ID );

This would no longer work so I changed it to

$_product = get_product(  $loop->post->ID );

Which fixed it right away.

In my opinion it would be good if they could update their own existing themes to work with the new version insead of just not caring what their end-users would end up with.

Adding a new currency to WooCommerce

Seemed to me that adding a new currency to WooCommerce would be extremely easy and wide spread which turns out is not the case. I couldn’t find any filter in the filter list with the hooks and filters list.

Anyway I managed to find out that there are two filters for this: ‘woocommerce_currencies’  and ‘woocommerce_currency_symbol’. Adding the bulgarian currency for instance is as easy as:

add_filter( 'woocommerce_currencies', 'add_bgn_currency' );
function add_bgn_currency( $currencies ) {
 $currencies['BGN'] = __( 'Bulgarian lev', 'woocommerce' );
 return $currencies;
add_filter('woocommerce_currency_symbol', 'add_bgn_currency_symbol', 10, 2);
function add_bgn_currency_symbol( $currency_symbol, $currency ) {
 switch( $currency ) {
 case 'BGN': $currency_symbol = 'лв.'; break;
 return $currency_symbol;

Note: All this code can be placed somewhere in your theme’s functions.php

The result is that now the currency is shown in the Currency list:

WooCommerce Currency Settings
WooCommerce Currency Settings

Anyway one problem still persists – the currency symbol position is totally unmanagable from a hook. It can be only set site-wide through the settings section of WooCommerce. It is also placed in a not-so-intuitive place:

WooCommerce Pricing Position
WooCommerce Pricing Position

This is how far I’ve got with the multilingual shop with WPML and WooCommerce. Still wondering how to make the symbol position to be currency-specific (and not be afraid to update the plugin afterwards). Maybe I’ll have to make it in JS in the end.

I’ll keep you posted! And follow this guy: