Skip to content

Commit

Permalink
Load script in footer
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamadNateqi committed Oct 28, 2024
1 parent f6c73d5 commit 995cefd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions wp-menu-cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@ public function load_edd_ajax() {
'wpmenucart-edd-ajax',
$this->plugin_url() . '/assets/js/wpmenucart-edd-ajax' . $this->asset_suffix . '.js',
array( 'jquery' ),
WPMENUCART_VERSION
WPMENUCART_VERSION,
true
);

wp_localize_script(
Expand Down Expand Up @@ -520,7 +521,8 @@ public function load_frontend_assets() {
'wpmenucart-ajax-assist',
$this->plugin_url() . '/assets/js/wpmenucart-ajax-assist' . $this->asset_suffix . '.js',
array( 'jquery' ),
WPMENUCART_VERSION
WPMENUCART_VERSION,
true
);
wp_localize_script(
'wpmenucart-ajax-assist',
Expand Down Expand Up @@ -575,7 +577,8 @@ public function register_cart_navigation_block() {
'wpmenucart-navigation-block',
$this->plugin_url() . '/assets/js/wpmenucart-navigation-block' . $this->asset_suffix . '.js',
array( 'wp-blocks', 'wp-element', 'wp-i18n', 'wp-server-side-render' ),
WPMENUCART_VERSION
WPMENUCART_VERSION,
true
);

register_block_type( 'wpo/wpmenucart-navigation', array(
Expand Down Expand Up @@ -868,7 +871,8 @@ public function wc_block_support_script() {
'wpmenucart-cart-checkout-js',
$this->plugin_url() . '/assets/js/wpmenucart-wc-block-support'. $this->asset_suffix . '.js',
array( 'jquery' ),
WPMENUCART_VERSION
WPMENUCART_VERSION,
true
);
wp_localize_script(
'wpmenucart-cart-checkout-js',
Expand Down

0 comments on commit 995cefd

Please sign in to comment.