Edit account form hooks

Fixes #5676
Closes #5677
woocommerce_coupon_is_valid_for_cart

Closes #5681
Replace get_page with get_post

get_page is deprecated since WP 3.5
Merge pull request #5780 from afurculita/patch-1

Replace get_page with get_post
Clear comment transients only on wp_update_comment_count

Does not need to be flushed when editing a product. Part of #5777
No need to clear all transients here - only clear parent's cache

Part of #5777
Remove wp_cache_flush() Closes #5777

Carrying on from previous commits, the need for a wildcard delete for
products is unnecessary. This removes the $wpdb query and
wp_cache_flush()
Invalidate query transients to avoid cache flush

Part of #5777. These transients are required and cannot be predicted.

If not using an external cache system, the DB is cleared still to keep
size down after invalidation.

For these 2 transients, invalidation occurs when visibility altering
product attributes are edited.
$key should be $transient_name

#5777