Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if( is_wc_endpoint('my-endpoint-1') ) {
- echo "My Endpoint #1";
- }
- if( is_wc_endpoint('my-endpoint-2') ) {
- echo "My Endpoint #2";
- }
- $endpoint = WC()->query->get_current_endpoint();
- if( 'my-endpoint-1' === $endpoint ) ) {
- echo "My Endpoint #1";
- }
- if( 'my-endpoint-2' === $endpoint ) ) {
- echo "My Endpoint #2";
- }
- function add_my_account_endpoints() {
- add_rewrite_endpoint( 'properties', EP_ROOT | EP_PAGES );
- add_rewrite_endpoint( 'inbox', EP_ROOT | EP_PAGES );
- add_rewrite_endpoint( 'help', EP_ROOT | EP_PAGES );
- add_rewrite_endpoint( 'submit-ticket', EP_ROOT | EP_PAGES );
- }
- add_action( 'init', 'add_my_account_endpoints' );
Add Comment
Please, Sign In to add comment