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 TemplateHero\Plugin\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 TemplateHero\Plugin\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 TemplateHero\Plugin\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 TemplateHero\Plugin\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 );