Skip to content

Instantly share code, notes, and snippets.

@wpbean
Created May 27, 2019 18:41
Show Gist options
  • Select an option

  • Save wpbean/ff5985939467ead65e07a1e6cf17aa69 to your computer and use it in GitHub Desktop.

Select an option

Save wpbean/ff5985939467ead65e07a1e6cf17aa69 to your computer and use it in GitHub Desktop.
LearnPress change back to class text
<?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