Extend integrations hub with more channels, caching, and refresh.
Cache per-store status for five minutes, add TikTok/Reddit/Meta cards, and let merchants refresh without reloading WordPress on every visit. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,7 +22,20 @@ class IntegrationController extends Controller
|
||||
return view('woo.integrations.index', [
|
||||
'store' => $store,
|
||||
'reachable' => $payload['reachable'],
|
||||
'cached' => (bool) ($payload['cached'] ?? false),
|
||||
'integrations' => $payload['integrations'],
|
||||
]);
|
||||
}
|
||||
|
||||
public function refresh(Request $request): \Illuminate\Http\RedirectResponse
|
||||
{
|
||||
$store = $this->currentStore($request);
|
||||
if ($store) {
|
||||
$this->integrations->forStore($store, refresh: true);
|
||||
}
|
||||
|
||||
return redirect()
|
||||
->route('woo.integrations.index')
|
||||
->with('status', 'Integration status refreshed.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user