improved the support for woocommerce 2.1.x