error: "Sorry, no products matched your selection. Please choose a different combination."
WooCommerce in WordPress shows all variations of variable product including unmatched variations thus the above error message may occur. But it used to be working fine. Perhaps, the error occurred after a WooCommerce update.
Update php version from 5.4 to 5.6. Since php version 5.6 is not in the official repository of CentOS 7 as of Jan 2016, follow this thread on CentOS to install php56u works fine.
- Click on System Status under WooCommerce plugin. There is a warning on php version under Server Environment stating that php 5.6 or above is required, ... php5.4 is running.
- As of Jan 2016, latest php version in the official repository of CentOS 7 is still the very old php5.4. Thus, 3rd party repository must be considered in order to install php5.6 on CentOS 7.
- Some advise updating php with Webtatic's php56w, but CentOS forum states that it is not recommended to use Webtatic repository.
- After installing/ replacing php5.4 with php56u, some php extensions may not be compatible with the new version. And these extensions have to be updated too. E.g. Imagick has to be updated. If PECL is in place, the following command works fine:
#yum install php56u-pecl-imagick
- CentOS 7.3
- WordPress 4.7.1
- WooCommerce plugin 2.6.13