| @@ -49,16 +49,15 @@ | ||
| 49 | 49 | 'dashboard_widget', |
| 50 | 50 | 'rollback', |
| 51 | 51 | 'uninstall_feedback', |
| 52 | 52 | 'licenser', |
| 53 | + 'endpoint', | |
| 54 | + 'notification', | |
| 53 | 55 | 'logger', |
| 54 | 56 | 'translate', |
| 55 | 57 | 'review', |
| 56 | 58 | 'recommendation', |
| 57 | - 'notification', | |
| 58 | - 'promotions', | |
| 59 | - 'welcome', | |
| 60 | - 'compatibilities', | |
| 59 | + | |
| 61 | 60 | ]; |
| 62 | 61 | |
| 63 | 62 | /** |
| 64 | 63 | * Initialize the sdk logic. |
| @@ -76,30 +75,8 @@ | ||
| 76 | 75 | } |
| 77 | 76 | } |
| 78 | 77 | |
| 79 | 78 | /** |
| 80 | - * Get cache token used in API requests. | |
| 81 | - * | |
| 82 | - * @return string Cache token. | |
| 83 | - */ | |
| 84 | - public static function get_cache_token() { | |
| 85 | - $cache_token = get_transient( 'themeisle_sdk_cache_token' ); | |
| 86 | - if ( false === $cache_token ) { | |
| 87 | - $cache_token = wp_generate_password( 6, false ); | |
| 88 | - set_transient( $cache_token, WEEK_IN_SECONDS ); | |
| 89 | - } | |
| 90 | - | |
| 91 | - return $cache_token; | |
| 92 | - } | |
| 93 | - | |
| 94 | - /** | |
| 95 | - * Clear cache token. | |
| 96 | - */ | |
| 97 | - public static function clear_cache_token() { | |
| 98 | - delete_transient( 'themeisle_sdk_cache_token' ); | |
| 99 | - } | |
| 100 | - | |
| 101 | - /** | |
| 102 | 79 | * Register product into SDK. |
| 103 | 80 | * |
| 104 | 81 | * @param string $base_file The product base file. |
| 105 | 82 | * |
| @@ -106,9 +83,9 @@ | ||
| 106 | 83 | * @return Loader The singleton object. |
| 107 | 84 | */ |
| 108 | 85 | public static function add_product( $base_file ) { |
| 109 | 86 | |
| 110 | - if ( ! is_file( $base_file ) ) { | |
| 87 | + if ( ! is_readable( $base_file ) ) { | |
| 111 | 88 | return self::$instance; |
| 112 | 89 | } |
| 113 | 90 | $product = new Product( $base_file ); |
| 114 | 91 | |