Support

Home Forums Event Espresso Premium Resend Email – redirection

Resend Email – redirection

Posted: May 25, 2017 at 7:35 pm

Viewing 3 reply threads


jbbruning

May 25, 2017 at 7:35 pm

Hi there,

Just doing some testing of links, and on the Thank You page is a link to “resend email”

The email sends with a copy of event registration details, but i also get redirected to a blank page with the following;

We’re sorry…

This is a system page for displaying transaction information after a purchase.
You are most likely seeing this notice because you have navigated to this page through some means other than completing a transaction.
Sorry for the disappointment, but you will most likely find nothing of interest here.

Is this normal behaviour? If not, any idea how to fix please.

Many thanks : )


Josh

  • Support Staff

May 25, 2017 at 9:18 pm

Hi there,

That’s actually not normal behavior. The way forward to find the fix will be to follow this guide:

https://eventespresso.com/wiki/troubleshooting-checklist/#pluginconflicts


jbbruning

May 29, 2017 at 2:40 am

Thanks Josh,

I’ve found that the issue comes from the way i’m using the shortcode within the WooCommerce “My Account” page as an additional endpoint.

When the shortcode is used on a normal page it works.

Any reason why that might be? I can provide login access if it’s something you might need to explore?

The code i’m using is below (in case it’s a useful reference point) within my functions file.

……………….

// 1. Register new endpoint to use for My Account page

function bbloomer_add_event_details_endpoint() {
add_rewrite_endpoint( 'my-events', EP_ROOT | EP_PAGES );
}

add_action( 'init', 'bbloomer_add_event_details_endpoint' );

// 2. Add new query var

function bbloomer_event_details_query_vars( $vars ) {
$vars[] = 'my-events';
return $vars;
}

add_filter( 'query_vars', 'bbloomer_event_details_query_vars', 0 );

// 3. Insert the new endpoint into the My Account menu

function bbloomer_add_event_details_link_my_account( $items ) {
$items['my-events'] = 'My Events';
return $items;
}

add_filter( 'woocommerce_account_menu_items', 'bbloomer_add_event_details_link_my_account' );

// 4. Add content to the new endpoint


function bbloomer_event_details_content() {
echo '<h3>My Events</h3>';
echo do_shortcode( '[ESPRESSO_MY_EVENTS]' );
}

add_action( 'woocommerce_account_my-events_endpoint', 'bbloomer_event_details_content' );

………………….

Thanks for any further help.


Josh

  • Support Staff

May 29, 2017 at 1:07 pm

OK, so to be clear the resend email link works as expected from the Thank You page, but not from your custom WooCommerce My Accounts section?

I think you’ll run into more than a few issues with trying to load in the
ESPRESSO_MY_EVENTS shortcode with do_shortcode. This is because that particular shortcode is not supported to be used outside of post content fields.

What I can suggest doing instead is you put the [ESPRESSO_MY_EVENTS] shortcode directly on the page below the [woocommerce_my_account] shortcode.

If you absolutely need to hide that section and only display if it’s clicked from the custom menu then you could change add the [ESPRESSO_MY_EVENTS] shortcode directly to the post content section of another page. Then change what you have in step 4 to display a link to the My registrations page.

Viewing 3 reply threads

The support post ‘Resend Email – redirection’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso