| @@ -563,26 +563,26 @@ | ||
| 563 | 563 | } |
| 564 | 564 | } |
| 565 | 565 | $wow_optin_template_import_status = 'successfully working'; |
| 566 | 566 | |
| 567 | - $activated_plugins = $installed_plugin == 'yes' ? apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) : array(); | |
| 568 | - if ( in_array( 'optin/optin.php', $activated_plugins ) && $wow_optin_template_id && $installed_plugin == 'yes' ) { | |
| 569 | - try { | |
| 570 | - if ( class_exists( '\OPTN\Includes\Db', true ) && method_exists( '\OPTN\Includes\Db', 'get_instance' ) ) { | |
| 571 | - $db_instance = \OPTN\Includes\Db::get_instance(); | |
| 572 | - if ( is_object( $db_instance ) && is_callable( array( $db_instance, 'activate_recipe' ) ) ) { | |
| 573 | - $db_instance->activate_recipe( | |
| 574 | - $wow_optin_template_id, | |
| 575 | - array( | |
| 576 | - 'disable_others' => true, | |
| 577 | - ) | |
| 578 | - ); | |
| 579 | - } | |
| 580 | - } | |
| 581 | - } catch ( \Throwable $e ) { | |
| 582 | - $wow_optin_template_import_status = 'have any problem to import Optin template.'; | |
| 583 | - } | |
| 584 | - } | |
| 567 | + // $activated_plugins = $installed_plugin == 'yes' ? apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) : array(); | |
| 568 | + // if ( in_array( 'optin/optin.php', $activated_plugins ) && $wow_optin_template_id && $installed_plugin == 'yes' ) { | |
| 569 | + // try { | |
| 570 | + // if ( class_exists( '\OPTN\Includes\Db', true ) && method_exists( '\OPTN\Includes\Db', 'get_instance' ) ) { | |
| 571 | + // $db_instance = \OPTN\Includes\Db::get_instance(); | |
| 572 | + // if ( is_object( $db_instance ) && is_callable( array( $db_instance, 'activate_recipe' ) ) ) { | |
| 573 | + // $db_instance->activate_recipe( | |
| 574 | + // $wow_optin_template_id, | |
| 575 | + // array( | |
| 576 | + // 'disable_others' => true, | |
| 577 | + // ) | |
| 578 | + // ); | |
| 579 | + // } | |
| 580 | + // } | |
| 581 | + // } catch ( \Throwable $e ) { | |
| 582 | + // $wow_optin_template_import_status = 'have any problem to import Optin template.'; | |
| 583 | + // } | |
| 584 | + // } | |
| 585 | 585 | // $wow_optin_template_import_status |
| 586 | 586 | return rest_ensure_response( |
| 587 | 587 | array( |
| 588 | 588 | 'success' => true, |