Created
May 27, 2019 18:41
-
-
Save wpbean/ff5985939467ead65e07a1e6cf17aa69 to your computer and use it in GitHub Desktop.
LearnPress change back to class text
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
| <?php | |
| /* | |
| * https://themeforest.net/item/reptro-online-course-wordpress-theme/21817850 | |
| */ | |
| remove_action( 'learn-press/after-checkout-form', 'learn_press_back_to_class_button' ); | |
| remove_action( 'learn-press/after-empty-cart-message', 'learn_press_back_to_class_button' ); | |
| add_action( 'learn-press/after-checkout-form', 'reptro_learn_press_back_to_class_button' ); | |
| add_action( 'learn-press/after-empty-cart-message', 'reptro_learn_press_back_to_class_button' ); | |
| if ( ! function_exists( 'reptro_learn_press_back_to_class_button' ) ) { | |
| function reptro_learn_press_back_to_class_button() { | |
| if( function_exists('learn_press_get_page_link') ){ | |
| $courses_link = learn_press_get_page_link( 'courses' ); | |
| if ( ! $courses_link ) { | |
| return; | |
| } | |
| ?> | |
| <a href="<?php echo learn_press_get_page_link( 'courses' ); ?>"><?php esc_html_e( 'Back to our courses', 'reptro' ); ?></a> | |
| <?php | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment