1. Home
  2. Docs
  3. Template Hero for Beaver Builder
  4. How to integrate Template Hero for Beaver Builder with Third Party Apps

How to integrate Template Hero for Beaver Builder with Third Party Apps

Here is a simple method to integrate Template Hero for Elementor with Third-Party Apps. Follow the instructions below

Create Template Hero Client Keys with other plugins

Use TemplateHeroBB\Template_Hero_Beaver_Builder\Api\Client as Api_Keys;
function th_create_keys( $form, $is_new ) {
 $set_of_keys = Api_Keys::th_create_client( get_current_user_id(), get_current_blog_id() );
 /**
  * You Will Get An Array Having A Set Of DB ID,client_id ( public ), client_secret ( private )
  */
}
add_action('gform_after_save_form', 'th_create_keys', 10, 2 ); 

How to integrate it with WooCommerce

 Use TemplateHeroBB\Template_Hero_Beaver_Builder\Api\Client as Api_Keys;
 function th_create_keys( $order_id ) {
 $order   = wc_get_order( $order_id );
 $user    = $order->get_user();
 $user_id = $order->get_user_id();
 $set_of_keys = Api_Keys::th_create_client( $user_id, get_current_blog_id() );
 /**
  * You Will Get An Array Having A Set Of DB ID,client_id ( public ), client_secret ( private )
  */
}
add_action('woocommerce_payment_complete', 'th_create_keys', 10, 1 ); 

How to integrate it with LifterLMS

 Use TemplateHeroBB\Template_Hero_Beaver_Builder\Api\Client as Api_Keys;
 function th_create_keys( $student_id, $course_id ) {
 $set_of_keys = Api_Keys::th_create_client( $student_id, get_current_blog_id() );
 /**
  * You Will Get An Array Having A Set Of DB ID,client_id ( public ), client_secret ( private )
  */
}
add_action('llms_user_enrolled_in_course', 'th_create_keys', 10, 2 ); 

How to integrate it with LearnDash

 Use TemplateHeroBB\Template_Hero_Beaver_Builder\Api\Client as Api_Keys;
 function th_create_keys( $args ) {
 $user = $args['user'];
 $set_of_keys = Api_Keys::th_create_client( $user->ID, get_current_blog_id() );
 /**
  * You Will Get An Array Having A Set Of DB ID,client_id ( public ), client_secret ( private )
  */
}
add_action('learndash_course_completed', 'th_create_keys', 10, 1 ); 
Was this article helpful to you? Yes No

How can we help?