How To Add My Registrations on My Account Page

How To Add My Registrations on My Account Page

The My Registration page allows your registered users to view all the events they have registered for in a centralized location. The page can be created with the shortcode  [my_registrations]

You can also create the My Registration page in the My Account section of the website. In this guide, we will tell you the steps using which you can perform the task.

By adding the following snippet to the functions.php file of a child theme, you can easily build the My Registration page in the My Account Section.

Note: Please ensure that the Sell ticket, Registration addons are active on the website. This is essential to work with the below mentioned shortcodes.

  1. // ------------------
  2. // 1. Register new endpoint to use for My Account page
  3. // Note: Resave Permalinks or it will give 404 error
  4. function wpem_add_my_registrations_endpoint() {
  5. add_rewrite_endpoint( 'my-registrations', EP_ROOT | EP_PAGES );
  6. }
  7. add_action( 'init', 'wpem_add_my_registrations_endpoint' );
  8. // ------------------ 
  9. // 2. Add new query var
  10. function wpem_my_registrations_query_vars( $vars ) {
  11. $vars[] = 'my-registrations';
  12. return $vars;
  13. }
  14. add_filter( 'query_vars', 'wpem_my_registrations_query_vars', 0 );
  15. // ------------------ 
  16. // 3. Insert the new endpoint into the My Account menu
  17. function wpem_add_my_registrations_link_my_account( $items ) {
  18. $items['my-registrations'] = 'My Registrations';
  19. return $items;
  20. }
  21. add_filter( 'woocommerce_account_menu_items', 'wpem_add_my_registrations_link_my_account' );
  22. // ------------------ 
  23. // 4. Add content to the new endpoint
  24. function wpem_my_registrations_content() {
  25. echo 'My Registrations';
  26. echo do_shortcode( '[my_registrations]' );
  27. }
  28. add_action( 'woocommerce_account_my-registrations_endpoint', 'wpem_my_registrations_content');


    • Related Articles

    • Event Detail Page

      The Event detail page carries various details of a particular event. These details include the event title, event type, event location, event start date & time, event end date & time, event description, etc. besides this, you can also get the details ...
    • How to allow organizers to add images in the description box

      How to allow organizers to add images in the description box on the submit event page? In order to allow the organizers to add images while submitting the event in the description box, from the frontend, you need to add the below-mentioned code in ...
    • Hide and Add column from the Event Dashboard

      An event dashboard displays all the details related to a specific event. A user can easily access the dashboard after logging into his or her account on WP Event Manager. The event dashboard column can be seen directly in the home page. A user can ...
    • List of all the default template and fields given in core and Premium Add-ons

      The default templates offered by WP Event Manager are mentioned below. The default fields & default template available in the core plugin are as follows: WP-Event-Manager Account-signin.php Content-event_listing.php Content-no-events-found.php ...
    • Event listings throw 404 page error

      Users may come across the 404 error while accessing the event listings. In this article, we will tell you how you can solve this issue. Here are the steps you need to take to solve this issue: Make sure that it is not a permalink issue: Go to your ...