simpler woocommerce_get_product_schema function.

Closes #3297.