Fix compatibility with woocommerce 2.1.9