'class-plugin.php', 'Settings' => 'class-settings.php', 'Log' => 'class-log.php', 'Signature' => 'class-signature.php', 'ApiClient' => 'class-api-client.php', 'CallbackKey' => 'class-callback-key.php', 'Coins' => 'class-coins.php', 'Amounts' => 'class-amounts.php', 'Texts' => 'class-texts.php', 'Payment' => 'class-payment.php', 'PaymentManager' => 'class-payment-manager.php', 'Cron' => 'class-cron.php', 'WebhookHandler' => 'class-webhook-handler.php', 'Button' => 'class-button.php', 'Checkout' => 'class-checkout.php', 'Rest' => 'class-rest.php', 'Email' => 'class-email.php', 'Admin' => 'class-admin.php', 'PaymentsTable' => 'class-payments-table.php', 'Block' => 'class-block.php', 'Brand' => 'class-brand.php', 'Lock' => 'class-lock.php', 'PaidContent' => 'class-paid-content.php', 'Privacy' => 'class-privacy.php', ]; $class_name = substr( $class, strlen( 'CryptowayButton\\' ) ); if ( ! isset( $map[ $class_name ] ) ) { return; } $file_path = CRYPTOWAY_BUTTON_DIR . 'includes/' . $map[ $class_name ]; if ( file_exists( $file_path ) ) { require_once $file_path; } } ); add_action( 'plugins_loaded', function (): void { \CryptowayButton\Plugin::get_instance(); } ); register_deactivation_hook( __FILE__, function ( $network_wide = false ): void { // Network deactivation: every site of the network has its own scheduled checks. if ( $network_wide && is_multisite() ) { foreach ( get_sites( [ 'fields' => 'ids', 'number' => 0 ] ) as $site_id ) { switch_to_blog( (int) $site_id ); \CryptowayButton\Cron::unschedule(); restore_current_blog(); } return; } \CryptowayButton\Cron::unschedule(); } );