• Resolved tehlivi

    (@tehlivi)


    I would like to update all endpoints to include /home/ before the endpoint. For instance, I would like the route for edit-account to be /home/account/edit-account. However, when I edit the endpoint from Woocommerce > Settings > Advanced > endpoints, slashes are converted to hyphens. Is this possible? I would prefer to do this work in functions.php, if possible.

Viewing 1 replies (of 1 total)
  • Thread Starter tehlivi

    (@tehlivi)

    Never mind. I was able to support new routes with new rewrite rules for each endpoint.

    
    add_rewrite_rule( '^' . $lang . '/home/(.?.+?)/edit-account(/(.*))?/?$', 'index.php?pagename=$matches[1]&edit-account=$matches[3]', 'top' );
    
Viewing 1 replies (of 1 total)
  • The topic ‘Include slash in endpoints?’ is closed to new replies.