Backport of action woocommerce_variable_product_sync from the 2.1 master

See ticket #3961 for details of the reasons for this backport.

I hope this pull request is aimed at the right branch. master is 2.1, so I'm guessing 2.0.18 (not released yet) is the latest for the 2.0 line of releases.