Last active
January 7, 2021 05:19
-
-
Save yousufansa/b0f7577ea816549d979e02a6cbf4ecb6 to your computer and use it in GitHub Desktop.
Front Jobs - Redirect Submit Form Login URL to WooCommerce Login Form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ( ! function_exists( 'front_child_login_form_url' ) ) { | |
| function front_child_login_form_url( $login_page_url ) { | |
| if( function_exists( 'front_is_woocommerce_activated' ) && front_is_woocommerce_activated() && get_option('woocommerce_myaccount_page_id') ) { | |
| $login_page_url = get_permalink( get_option('woocommerce_myaccount_page_id') ); | |
| } | |
| return $login_page_url; | |
| } | |
| } | |
| add_filter( 'submit_job_form_login_url', 'front_child_login_form_url' ); | |
| add_filter( 'job_manager_job_dashboard_login_url', 'front_child_login_form_url' ); | |
| add_filter( 'submit_resume_form_login_url', 'front_child_login_form_url' ); | |
| add_filter( 'resume_manager_candidate_dashboard_login_url', 'front_child_login_form_url' ); | |
| add_filter( 'job_manager_alerts_login_url', 'front_child_login_form_url' ); | |
| add_filter( 'job_manager_bookmark_form_login_url', 'front_child_login_form_url' ); | |
| add_filter( 'mas_wpjmcr_rating_field_login_redirect_url', 'front_child_login_form_url' ); | |
| // Job Application Signin URL Redirect To WooCommerce Login Page | |
| if ( ! function_exists( 'front_child_login_job_applications_login_url_redirect' ) ) { | |
| function front_child_login_job_applications_login_url_redirect( $message ) { | |
| if( function_exists( 'front_is_woocommerce_activated' ) && front_is_woocommerce_activated() && get_option('woocommerce_myaccount_page_id') ) { | |
| $login_page_url = get_permalink( get_option('woocommerce_myaccount_page_id') ); | |
| $message = str_replace( wp_login_url( get_permalink() ), $login_page_url, $message); | |
| } | |
| return $message; | |
| } | |
| } | |
| add_filter( 'job_manager_job_applications_login_required_message', 'front_child_login_job_applications_login_url_redirect' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment