• I have a requirement to redirect the user to a category listing page after logging in. It doesn’t have a page ID, so I can’t manipulate this->my_account.

    Would you consider adding a filter like this?

    diff --git a/public/class-xlwuev-woocommerce-confirmation-email-public.php b/public/class-xlwuev-woocommerce-confirmation-email-public.php
    index 6064b14..00b326b 100644
    --- a/public/class-xlwuev-woocommerce-confirmation-email-public.php
    +++ b/public/class-xlwuev-woocommerce-confirmation-email-public.php
    @@ -199,7 +199,7 @@ class XLWUEV_Woocommerce_Confirmation_Email_Public {
     						if ( false === $order_received_page ) {
     							$redirect_url = add_query_arg( array(
     								'xlsm' => base64_encode( $user_id ),
    -							), get_the_permalink( $this->my_account ) );
    +							), apply_filters( 'xlwuev_custom_myaccount_redirect_url', get_the_permalink( $this->my_account ) ) );
     							wp_safe_redirect( $redirect_url );
     							exit;
     						}
    @@ -392,11 +392,11 @@ class XLWUEV_Woocommerce_Confirmation_Email_Public {
     							if ( $is_new_user ) {
     								$redirect_url = add_query_arg( array(
     									'xlrm' => base64_encode( $user->ID ),
    -								), get_the_permalink( $this->my_account ) );
    +								), apply_filters( 'xlwuev_custom_myaccount_redirect_url', get_the_permalink( $this->my_account ) ) );
     							} else {
     								$redirect_url = add_query_arg( array(
     									'xlsm' => base64_encode( $user->ID ),
    -								), get_the_permalink( $this->my_account ) );
    +								), apply_filters( 'xlwuev_custom_myaccount_redirect_url', get_the_permalink( $this->my_account ) ) );
     							}
     
     							$error_validation_page = XlWUEV_Common::get_setting_value( 'wuev-general-settings', 'xlwuev_verification_error_page' );
    @@ -536,7 +536,7 @@ class XLWUEV_Woocommerce_Confirmation_Email_Public {
     		$create_link = $secret . '@' . $this->user_id;
     		$hyperlink   = add_query_arg( array(
     			'woo_confirmation_verify' => base64_encode( $create_link ),
    -		), get_the_permalink( $this->my_account ) );
    +		), apply_filters( 'xlwuev_custom_myaccount_redirect_url', get_the_permalink( $this->my_account ) ) );
     		$link_text   = XlWUEV_Common::maybe_parse_merge_tags( XlWUEV_Common::get_setting_value( 'wuev-messages', 'xlwuev_email_new_verification_link_text' ) );
     		$link        = '<a href="' . $hyperlink . '">' . $link_text . '</a>';
     
    
  • The topic ‘Add support for custom redirect URL?’ is closed to new replies.