Subscription renew when using woocommerce subscription plugin

Add the following code in wplms-customizer.php of  wplms customizer plugin Or in functions.php of child theme.

add_action('init','bp_course_renew_subscription');
function bp_course_renew_subscription(){
   if(function_exists('bp_course_enable_access')){
     add_action('woocommerce_renewal_order_payment_complete','bp_course_enable_access');
     add_action('woocommerce_renewal_order_payment_cencelled','bp_course_disable_access');
   }
}