# ali2woo-lite/trunk/includes/classes/service/SynchronizePurchaseCodeInfoService.php

AliNext – WooCommerce Dropshipping Plugin for AliExpress, version trunk. 33 lines.

- Page: https://pluginprobe.com/plugins/ali2woo-lite/trunk/code/includes/classes/service/SynchronizePurchaseCodeInfoService.php
- Raw: https://pluginprobe.com/plugins/ali2woo-lite/trunk/raw/includes/classes/service/SynchronizePurchaseCodeInfoService.php
- Modified: 2025-04-11T08:43:02+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ali2woo-lite/trunk/code/includes/classes/service/SynchronizePurchaseCodeInfoService.php#L10-L20`.

```php
<?php

/**
 * Description of PurchaseCodeInfoService
 *
 * @author Ali2Woo Team
 */

namespace AliNext_Lite;;

class SynchronizePurchaseCodeInfoService
{
    protected SynchronizePurchaseCodeInfoProcess $SynchronizePurchaseCodeInfoProcess;

    public function __construct(
        SynchronizePurchaseCodeInfoProcess $SynchronizePurchaseCodeInfoProcess
    ) {
        $this->SynchronizePurchaseCodeInfoProcess = $SynchronizePurchaseCodeInfoProcess;
    }

    public function runSyncPurchaseCodeInfoProcess(): void
    {
        if (!Account::getInstance()->get_purchase_code()) {
            return;
        }

        if (!$this->SynchronizePurchaseCodeInfoProcess->isQueued()) {
            //schedule new job, only if previous is finished
            $this->SynchronizePurchaseCodeInfoProcess->pushToQueue()->save()->dispatch();
        }
    }

}
```
