first commit

This commit is contained in:
2024-07-15 11:28:08 +02:00
commit f52d538ea5
21891 changed files with 6161164 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
call_user_func(function() {
$pluginEntryFile = wp_normalize_path(__DIR__.'/plugin.php');
register_activation_hook($pluginEntryFile, function() {
$otherPluginVersions = array();
foreach (get_option('active_plugins') as $pluginFile) {
$data = get_file_data(WP_PLUGIN_DIR.'/'.$pluginFile, array('PluginFamilyId' => 'Plugin Family Id'));
$id = @$data['PluginFamilyId'];
if ($id === 'dangoodman/wc-weight-based-shipping') {
$otherPluginVersions[] = $pluginFile;
}
}
if ($otherPluginVersions) {
deactivate_plugins($otherPluginVersions);
}
});
if (!class_exists('Wbs\Plugin', false)) {
require_once(__DIR__ . "/server/vendor/autoload.php");
\Wbs\Plugin::setupOnce($pluginEntryFile);
}
});