Last active
November 25, 2023 15:54
-
-
Save rwkyyy/11c69d5d0791f15ce7c8c6c13d9083a4 to your computer and use it in GitHub Desktop.
allow sensei LMS users to re-purchase courses (re-take them)
This file contains 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
// fix repurchase courses | |
function custom_remove_sensei_course_restriction() { | |
remove_action( 'woocommerce_add_to_cart', ['Sensei_WC', 'do_not_add_course_to_cart_if_user_taking_course'], 10 ); | |
} | |
add_action( 'init', 'custom_remove_sensei_course_restriction', 30 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
updated to initt as in some cases it would not trigger correctly.