Forum Replies Created
- AuthorPosts
- July 7, 2020 at 2:44 pm in reply to: Redirect to Product page instead of Dashboard after Login. #146657server.monks123Participant
Hey Sarmistha can you help me with a code snippet to redirect only vendors to wcfm vendor dashboard on login
July 7, 2020 at 4:20 am in reply to: Display vendor name on invoice and order conformation page #146563server.monks123Participantcan you provide us with any snippet to add vendor name and address in pdf invoice Please.
server.monks123Participantadd_filter( ‘wcfm_logout_url’, function( $logout_url ) {
if ( wcfm_is_vendor() ) {
return ‘https://inditribes.co.in/’;
}
return $logout_url;
} );
add_filter( ‘woocommerce_get_endpoint_url’, function($url, $endpoint, $value, $permalink) {
if ( $permalink === ‘https://inditribes.co.in/’ ) {
return add_query_arg( ‘wcfm_logout’, ‘yes’, $permalink );
}
return $url;
}, 10, 4 );
function redirect_page() {
global $wp;
if ( ! empty( $_REQUEST[‘wcfm_logout’] ) && ! empty( $_REQUEST[‘_wpnonce’] ) && wp_verify_nonce( sanitize_key( $_REQUEST[‘_wpnonce’] ), ‘customer-logout’ ) ) {
wp_safe_redirect( str_replace( ‘&’, ‘&’, wp_logout_url( esc_url_raw( ‘https://inditribes.co.in/’ ) ) ) );
exit;
}
}
add_action( ‘template_redirect’, ‘redirect_page’ );server.monks123ParticipantHello Sushobhan
I also tried the code, The logout redirection worked but wen the vendor logs out from Store Manager, It gives them a prompt, something like “Do You really want to logout from “Website Url”? On confirmation, it redirects to the wordpress admin Login Url instead of the https://inditribes.co.in
Please help me outAttachments:
You must be logged in to view attached files. - AuthorPosts