Created
April 26, 2022 14:51
-
-
Save amirhmoradi/ff63c374af84f591b19126e0c08d75b3 to your computer and use it in GitHub Desktop.
Wordpress Woocommerce Force custom page/post ID as Terms and Conditions page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This allows you to use a custom page (custom post type) as your WooCommerce "Terms and Conditions" page. | |
* Once set, you wont need to select the page in Woocommerce settings. | |
**/ | |
function amirhmoradi_force_terms_page_to_wc($page_id) | |
{ | |
return 207; | |
} | |
add_filter('woocommerce_get_terms_page_id', 'amirhmoradi_force_terms_page_to_wc', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment