-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuninstall.php
More file actions
36 lines (28 loc) · 967 Bytes
/
uninstall.php
File metadata and controls
36 lines (28 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
declare(strict_types=1);
namespace Syde\PayPal\PointOfSale;
use Inpsyde\Queue\Queue\Job\Context;
use Inpsyde\Queue\Queue\Job\EphemeralJobRepository;
use Inpsyde\Queue\Queue\Job\Job;
use Syde\PayPal\PointOfSale\Onboarding\Job\ResetOnboardingJob;
use Psr\Container\ContainerInterface;
if (!defined('WP_UNINSTALL_PLUGIN')) {
die('Direct access not allowed.');
}
(static function () {
if (
!class_exists(PluginModule::class)
&& file_exists(__DIR__ . '/vendor/autoload.php')
) {
include_once __DIR__ . '/vendor/autoload.php';
}
$container = (require __DIR__ . '/bootstrap.php')(__DIR__);
assert($container instanceof ContainerInterface);
$resetJob = $container->get('paypal-pos.job.' . ResetOnboardingJob::TYPE);
assert($resetJob instanceof Job);
$resetJob->execute(
Context::fromArray([]),
new EphemeralJobRepository(),
$container->get('inpsyde.queue.logger')
);
})();