| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | /** |
| 4 | 4 | * Plugin Name: Timetics |
| 5 | 5 | * Plugin URI: https://arraytics.com/timetics/ |
| 6 | 6 | * Description: Schedule, Appointment and Seat Booking plugin. |
| 7 | - * Version: 1.0.21 | |
| 7 | + * Version: 1.0.38 | |
| 8 | 8 | * Requires at least: 5.2 |
| 9 | 9 | * Requires PHP: 7.3 |
| 10 | 10 | * Author: Arraytics |
| 11 | 11 | * Author URI: https://arraytics.com/ |
| @@ -55,9 +55,9 @@ | ||
| 55 | 55 | * |
| 56 | 56 | * @return string |
| 57 | 57 | */ |
| 58 | 58 | public static function get_version() { |
| 59 | - return '1.0.21'; | |
| 59 | + return '1.0.38'; | |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | 63 | * Requirements Array |
| @@ -103,9 +103,9 @@ | ||
| 103 | 103 | * @since 1.0.0 |
| 104 | 104 | */ |
| 105 | 105 | private function __construct() { |
| 106 | 106 | // Always load translation. |
| 107 | - add_action( 'plugins_loaded', array( $this, 'load_text_domain' ) ); | |
| 107 | + add_action( 'init', array( $this, 'load_text_domain' ) ); | |
| 108 | 108 | |
| 109 | 109 | // Initialize plugin functionalities or quit. |
| 110 | 110 | $this->requirements_met() ? $this->initialize_modules() : $this->quit(); |
| 111 | 111 | } |
| @@ -220,8 +220,25 @@ | ||
| 220 | 220 | * @return void |
| 221 | 221 | */ |
| 222 | 222 | public function init() { |
| 223 | 223 | Timetics\Bootstrap::instantiate( self::get_plugin_file() ); |
| 224 | + | |
| 225 | + // Add autoload from composer for integrating uninstallation form | |
| 226 | + if (file_exists(plugin_dir_path( __FILE__ ) . '/vendor/autoload.php')) { | |
| 227 | + require_once plugin_dir_path( __FILE__ ) . '/vendor/autoload.php'; | |
| 228 | + } | |
| 229 | + | |
| 230 | + if ( class_exists( 'UninstallerForm\UninstallerForm' ) ) { | |
| 231 | + $uninstaller_form = new \UninstallerForm\UninstallerForm(); | |
| 232 | + $uninstaller_form->init( | |
| 233 | + 'Timetics', // Plugin name | |
| 234 | + 'timetics', // Plugin Slug | |
| 235 | + __FILE__, | |
| 236 | + 'timetics', // Text Domain Name | |
| 237 | + 'timetics-feedback-modal', // plugins-admin-script-handler | |
| 238 | + 'https://arraytics.com/?fluentcrm=1&route=contact&hash=13cce8a6-c038-4997-91e7-4a2326cc1124' | |
| 239 | + ); | |
| 240 | + } | |
| 224 | 241 | } |
| 225 | 242 | |
| 226 | 243 | /** |
| 227 | 244 | * Called Only Once While Activation |
| @@ -242,8 +259,16 @@ | ||
| 242 | 259 | timetics_add_woocommerce_product_cat(); |
| 243 | 260 | |
| 244 | 261 | // Update option for onboard settings. |
| 245 | 262 | $timetics_onboard_setup = get_option( 'timetics_onboard_setup' ); |
| 263 | + | |
| 264 | + $timetics_demo_data = get_option( 'timetics_demo_data' ); | |
| 265 | + | |
| 266 | + if ( ! $timetics_demo_data ) { | |
| 267 | + $dummy_data_generator = new Timetics\Core\DummyData\Dummy_Data_Generator(); | |
| 268 | + $dummy_data_generator->generate(); | |
| 269 | + update_option( 'timetics_demo_data', true ); | |
| 270 | + } | |
| 246 | 271 | |
| 247 | 272 | if ( ! $timetics_onboard_setup ) { |
| 248 | 273 | update_option( 'timetics_onboard_settings', true ); |
| 249 | 274 | } |