Page functions woocommerce to wc refactor