Sometimes, especially if you are using custom plugins to import stock data, you may find products with some stock value (greater then 0) but with stock flag set to “out of stock”. How to find them? Using WP_Query of course:

$args = array(
	'post_type' => 'product_variation',
	'posts_per_page' => -1,
	'meta_query' => array(
		array(
			'key' => '_stock_status',
			'value' => 'outofstock',
		),
		array(
			'key' => '_stock',
			'value' => '0',
			'compare' => '>',
			'type' => 'NUMERIC'
		),
	),
);
$products = new WP_Query($args);

Notice ‘post_type’ => ‘product_variation’ – if you are not using variations, just change it to ‘product’.

This can be really frustrating, you wanted your woocommerce shop running multilingual, but from cart page “Checkout” button leads to default language version? Solution is very simple, but not elegant – so far did not found another solution. First step is to create all woocommerce pages in every language you need, this is very simple but can take some time. Then, in your child theme (remember not to make any modifications to theme you are using!), in functions.php add such code:

function get_woocommerce_checkout_polylang()
{
    return pll_get_post(get_option('woocommerce_checkout_page_id' ) );
}
add_filter('woocommerce_get_checkout_page_id', "get_woocommerce_checkout_polylang");

function get_woocommerce_shop_polylang()
{
    return pll_get_post(get_option('woocommerce_shop_page_id' ) );
}
add_filter('woocommerce_get_shop_page_id', "get_woocommerce_shop_polylang");

function get_woocommerce_cart_polylang()
{
    return pll_get_post(get_option('woocommerce_cart_page_id' ) );
}
add_filter('woocommerce_cart_page_id', "get_woocommerce_cart_polylang");

function get_woocommerce_pay_polylang()
{
    return pll_get_post(get_option('woocommerce_pay_page_id' ) );
}
add_filter('woocommerce_pay_page_id', "get_woocommerce_pay_polylang");

function get_woocommerce_thanks_polylang()
{
    return pll_get_post(get_option('woocommerce_thanks_page_id' ) );
}
add_filter('woocommerce_thanks_page_id', "get_woocommerce_thanks_polylang");

function get_woocommerce_myaccount_polylang()
{
    return pll_get_post(get_option('woocommerce_myaccount_page_id' ) );
}
add_filter('woocommerce_myaccount_page_id', "get_woocommerce_myaccount_polylang");

function get_woocommerce_edit_address_polylang()
{
    return pll_get_post(get_option('woocommerce_edit_address_page_id' ) );
}
add_filter('woocommerce_edit_address_page_id', "get_woocommerce_edit_address_polylang");

function get_woocommerce_view_order_polylang()
{
    return pll_get_post(get_option('woocommerce_view_order_page_id' ) );
}
add_filter('woocommerce_view_order_page_id', "get_woocommerce_view_order_polylang");

function get_woocommerce_terms_polylang()
{
    return pll_get_post(get_option('woocommerce_terms_page_id' ) );
}
add_filter('woocommerce_terms_page_id', "get_woocommerce_terms_polylang");

All those functions are using same pll_get_post from Polylang plugin, to translate your default page ID you set in Woocommerce/Settings/Checkout/Checkout Pages to their translated version. Hope you will find it useful.

Well, the easiest way is to use

composer.phar update

but if you don’t want to update all bundles and waste an hour of your time, you can use:

php vendor\sensio\distribution-bundle\Sensio\Bundle\DistributionBundle\Resources\bin\build_bootstrap.php <app>

where <app> is placeholder for you app dir, like “app/frontend” or “app/backend”
in case you don’t have build_bootstrap.php on path above (it works for Symfony 2.7.x) just search for it inside vendor\sensio\distribution-bundle\Sensio\Bundle\DistributionBundle