Skip to content

Commit

Permalink
remove: react components manual enqueue.
Browse files Browse the repository at this point in the history
  • Loading branch information
MdAsifHossainNadim committed Jan 20, 2025
1 parent 3241d9a commit 6565f41
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions includes/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,12 @@ public function get_scripts() {

// Register React components.
$scripts['dokan-react-components'] = [
'src' => $asset_url . '/js/components.js',
'deps' => array_merge( $components_asset['dependencies'], [ 'dokan-utilities', 'dokan-hooks' ] ),
'version' => $components_asset['version'],
'src' => $asset_url . '/js/components.js',
'deps' => array_merge(
$components_asset['dependencies'],
[ 'dokan-utilities', 'dokan-hooks' ]
),
];
}

Expand All @@ -617,9 +620,6 @@ public function enqueue_front_scripts() {
return;
}

wp_enqueue_script( 'dokan-react-components' );
wp_enqueue_script( 'dokan-react-components' );

// load dokan style on every pages. requires for shortcodes in other pages
if ( DOKAN_LOAD_STYLE ) {
wp_enqueue_style( 'dokan-style' );
Expand Down

0 comments on commit 6565f41

Please sign in to comment.