Custom account page that accepts a query parameter

That add_rewrite_endpoint(“scheduled-order-create/([0-9]+)/?”, …); doesn’t work because add_rewrite_endpoint() doesn’t work with custom RegEx pattern. And remember that in addition to default public query vars like cat, tag, year and author, WordPress also makes all public post types and taxonomies (with a non-empty query_var value when registered — see register_post_type() and register_taxonomy()) be readable from the URL … Read more

Get UserInfo from WordPress

Since you’re using a JWT for the current user (that is logged into WordPress), you can use this endpoint: /wp/v2/users/me https://developer.wordpress.org/rest-api/reference/users/#retrieve-a-user-2 You can also check the token to see what claims are available at https://jwt.ms

php code for outputting a custom page in my account

Check this one: How to add a new endpoint in woocommerce Update In your callback function include your extended template page because output is expected. ex: function foren_content() { include(‘woocommerce/myaccount/custom-page.php’); } Then inside custom-page.php call the desired content with get_post(ID) or if you have your endpoint registerd in woocommerce settings call it by slug. The … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)