Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Maciej Bis

    (@mbis)

    Hi @rezamnchr,

    To display the debug data please use the below URL (when the plugin is activated):

    https://rezamanouchehri.com/my-account/?debug_url=1

    Thread Starter Reza Manouchehri

    (@rezamnchr)

    Here you are, the debug data:

    Array ( [uri_parts] => Array ( [lang] => [uri] => my-account [endpoint] => [endpoint_value] => ) [old_query_vars] => Array ( [page] => [pagename] => my-account ) [new_query_vars] => Array ( [pagename] => my-account [do_not_redirect] => 1 ) [pm_query] => 17 [content_type] => Post type: page [version] => 2.4.4.3 )

    Plugin Author Maciej Bis

    (@mbis)

    Hi, could you try to use this code snippet?

    function pm_fix_dashboard_query($query, $old_query, $uri_parts, $pm_query, $content_type) {
    $dashboard_page_id = ( function_exists( 'wc_get_page_id' ) ) ? wc_get_page_id( 'myaccount' ) : '';

    if ( ! empty( $pm_query['id'] ) && ! empty( $dashboard_page_id ) && $dashboard_page_id == $pm_query['id'] ) {
    $old_query['do_not_redirect'] = 1;

    return $old_query;
    }

    return $query;
    }
    add_filter('permalink_manager_filter_query', 'pm_fix_dashboard_query', 3, 5);

    or alternatively exclude dashboard page by its ID using the plugin settings?

    https://permalinkmanager.pro/docs/exclude-content-types/#6-exclude-by-id

    Thread Starter Reza Manouchehri

    (@rezamnchr)

    Hello

    I appreciate your fast reply and support. I tried the second method, excluding my account page in the plugin settings, and it worked! The customs customer dashboard is displayed now!

    Thanks a lot

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.