Add per-store managers for Woo Business accounts.
Deploy Ladill Woo Manager / deploy (push) Successful in 39s
Deploy Ladill Woo Manager / deploy (push) Successful in 39s
Agencies can invite store-scoped managers via Identity, with access limited to one WooCommerce store while owners retain full multi-store control. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -17,16 +17,17 @@ class AppServiceProvider extends ServiceProvider
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
View::composer(['partials.sidebar', 'partials.topbar', 'partials.mobile-bottom-nav', 'partials.store-switcher-menu'], function ($view) {
|
||||
View::composer(['partials.sidebar', 'partials.topbar', 'partials.mobile-bottom-nav', 'partials.store-switcher-menu', 'partials.store-switcher'], function ($view) {
|
||||
$account = ladill_account() ?? auth()->user();
|
||||
$svc = app(SubscriptionService::class);
|
||||
$stores = app(CurrentWooStore::class);
|
||||
$storeIds = request()->attributes->get('woo.storeIds');
|
||||
|
||||
$view->with('isPro', $account ? $svc->isPro($account) : false);
|
||||
$view->with('hasPaidPlan', $account ? $svc->hasPaidPlan($account) : false);
|
||||
$view->with('isEnterprise', $account ? $svc->isEnterprise($account) : false);
|
||||
$view->with('wooActiveStores', $account ? $stores->activeStores($account) : collect());
|
||||
$view->with('currentWooStore', $account ? $stores->resolve($account) : null);
|
||||
$view->with('wooActiveStores', $account ? $stores->activeStores($account, $storeIds) : collect());
|
||||
$view->with('currentWooStore', $account ? $stores->resolve($account, $storeIds) : null);
|
||||
});
|
||||
|
||||
View::composer(['partials.topbar'], function ($view) {
|
||||
|
||||
Reference in New Issue
Block a user