function ac_add_my_custom_endpoint() {
add_rewrite_endpoint( 'custom-tab', EP_ROOT | EP_PAGES );
}
add_action( 'init', 'ac_add_my_custom_endpoint' );
add_rewrite_endpoint( 'custom-tab', EP_ROOT | EP_PAGES );
}
add_action( 'init', 'ac_add_my_custom_endpoint' );
/*/*/*/*/*/*
function ac_add_custom_query_vars( $vars ) {
$vars[] = 'custom-tab';
return $vars;
}
add_filter( 'query_vars', 'ac_add_custom_query_vars', 5 );
function ac_add_custom_query_vars( $vars ) {
$vars[] = 'custom-tab';
return $vars;
}
add_filter( 'query_vars', 'ac_add_custom_query_vars', 5 );
/*/*/*/*/*/*/*/
function ac_add_custom_menu_item_my_account( $items ) {
$items['custom-tab'] = 'Custom Tab';
return $items;
}
add_filter( 'woocommerce_account_menu_items', 'ac_add_custom_menu_item_my_account' );
/*/*/*/*/
function ac_custom_tab_content_my_account() {
echo 'Go Back to <a href="https://Eaxmple.com/">Custom Website</a>';
}
add_action( 'woocommerce_account_custom-tab_endpoint', 'ac_custom_tab_content_my_account' );
/*/*/*/*/*
No comments:
Post a Comment