Add Woo Manager Pro with multi-store switching and free-tier limits.
Deploy Ladill Woo Manager / deploy (push) Successful in 51s

Free: 1 store and 20 products. Pro/Business mirrors Invoice pricing (GHS 49/149)
with wallet renewals, Paystack prepay, session-based store switcher, and scoped UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-07 01:14:08 +00:00
co-authored by Cursor
parent 551473f8e5
commit cebf0d2e61
34 changed files with 1340 additions and 263 deletions
+11 -3
View File
@@ -2,6 +2,7 @@
namespace App\Services\Woo;
use App\Models\User;
use App\Models\WooStore;
class CatalogSyncService
@@ -10,13 +11,14 @@ class CatalogSyncService
private PluginClient $client,
private ProductIngestService $products,
private CategoryIngestService $categories,
private SubscriptionService $subscriptions,
) {}
public function syncAll(WooStore $store): array
public function syncAll(WooStore $store, ?User $user = null): array
{
return [
'categories' => $this->syncCategories($store),
'products' => $this->syncProducts($store),
'products' => $this->syncProducts($store, $user),
];
}
@@ -44,7 +46,7 @@ class CatalogSyncService
return $count;
}
public function syncProducts(WooStore $store): int
public function syncProducts(WooStore $store, ?User $user = null): int
{
$response = $this->client->get($store, 'products', ['per_page' => 100]);
if (! is_array($response)) {
@@ -61,6 +63,12 @@ class CatalogSyncService
if (! is_array($item)) {
continue;
}
$externalId = (int) ($item['id'] ?? 0);
if ($user && ! $this->subscriptions->canIngestProduct($user, $store, $externalId)) {
continue;
}
$this->products->ingest($store, $item);
$count++;
}