multivendorx / woocommerce-product-stock-alert

8 stars 17 forks source link

Unnecessary wp block editor assets in frontend #243

Open moumitahalder opened 1 week ago

moumitahalder commented 1 week ago

Looks like method enqueue_block_assets() in StockManager class should check if request is admin or preview before wp_enqueue_script() call.

Currently this is causing unnecessary script bloat in frontend and request to /wp-json/wp/v2/users/me?context=edit&_locale=user which fails miserably with 401 error if user is not logged in.

UjjwalGorai commented 1 week ago

Fixed this issue with Pull Request: https://github.com/multivendorx/woocommerce-product-stock-alert/pull/244