Skip to content

Commit 6d86ad4

Browse files
committed
append to manifest later in boot order
1 parent b3842f1 commit 6d86ad4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/Providers/AssetsServiceProvider.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@
1212

1313
class AssetsServiceProvider extends ServiceProvider
1414
{
15-
/**
16-
* Register assets services.
17-
*/
15+
/**
16+
* Register assets services.
17+
*/
1818
public function register(): void
1919
{
20-
app('assets')->manifest(
21-
'acorn-socials',
22-
[
20+
add_action('wp_enqueue_scripts', function (): void {
21+
app('assets')->manifest(
22+
'acorn-socials',
23+
[
2324
'handler' => (new ManifestHandler())(),
2425
'path' => ITINERIS_ACORN_SOCIALS_PUBLIC_DIR . '/build',
2526
'url' => ITINERIS_ACORN_SOCIALS_PUBLIC_URI . '/build',
2627
'assets' => ITINERIS_ACORN_SOCIALS_PUBLIC_DIR . '/build/manifest.json',
27-
],
28-
);
28+
],
29+
);
2930

30-
add_action('wp_enqueue_scripts', function (): void {
3131
if (AcornSocials::hasSocial('native')) {
3232
wp_enqueue_script_module(
3333
'acorn-socials/native',

0 commit comments

Comments
 (0)