Title: Plugin breaks Generate variations JS callback
Last modified: June 5, 2024

---

# Plugin breaks Generate variations JS callback

 *  [treestonemedia](https://wordpress.org/support/users/treestonemedia/)
 * (@treestonemedia)
 * [2 years ago](https://wordpress.org/support/topic/plugin-breaks-generate-variations-js-callback/)
 * **Preconditions**
    - Log in to WOO admin with an account that has the “Shop Manager” only role
 * **Steps to Reproduce**
    - Create a new product
    - Set the product type to Variable Product
    - Click on the Attributes tab
    - Add existing or new attribute and attribute values
    - Make sure “used for variations” is checked
    - click on save attributes
    - click on the Variations tab
    - click on the Generate variations button and hit ok on the confirmation popup
 * **Expected Results**
    - Variation products are created
    - Created variation products are displayed on the Variations tab (same screen)
 * **Actual Results**
    - The spinner spins forever
    - The variation products are created but they don’t get displayed
 * **Additional Information**
    - This does not happen when logged in as an administrator
    - There is a Console error that seems to be the culprit (this error does not
      show when using an administrator account)
    - `meta-boxes-product-variation.min.js?ver=8.8.3:1 Uncaught TypeError: Cannot
      read properties of undefined (reading 'dispatch') at Object.success (meta-
      boxes-product-variation.min.js?ver=8.8.3:1:15167) at c (load-scripts.php?c
      =1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-
      runtime,wp-polyfill,wp-hooks&ver=87076ba087c933f5afa19d77bc17c638:2:25304)
      at Object.fireWith [as resolveWith] (load-scripts.php?c=1&load%5Bchunk_0%5D
      =jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-
      polyfill,wp-hooks&ver=87076ba087c933f5afa19d77bc17c638:2:26053) at l (load-
      scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-
      inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=87076ba087c933f5afa19d77bc17c638:
      2:77782) at XMLHttpRequest.<anonymous> (load-scripts.php?c=1&load%5Bchunk_0%
      5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,
      wp-polyfill,wp-hooks&ver=87076ba087c933f5afa19d77bc17c638:2:80265) (anonymous)
      @ meta-boxes-product-variation.min.js?ver=8.8.3:1 c @ load-scripts.php?c=1&
      load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-
      runtime,wp-polyfill,wp-hooks&ver=87076ba087c933f5afa19d77bc17c638:2 fireWith
      @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,
      wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=87076ba087c933f5afa19d77bc17c638:
      2 l @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,
      wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=87076ba087c933f5afa19d77bc17c638:
      2 (anonymous) @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-
      migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver
      =87076ba087c933f5afa19d77bc17c638:2 load (async) send @ load-scripts.php?c
      =1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-
      runtime,wp-polyfill,wp-hooks&ver=87076ba087c933f5afa19d77bc17c638:2 ajax @
      load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-
      polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=87076ba087c933f5afa19d77bc17c638:
      2 (anonymous) @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-
      migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver
      =87076ba087c933f5afa19d77bc17c638:5 e.<computed> @ load-scripts.php?c=1&load%
      5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-
      runtime,wp-polyfill,wp-hooks&ver=87076ba087c933f5afa19d77bc17c638:5 ce.<computed
      > @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,
      wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=87076ba087c933f5afa19d77bc17c638:
      2 link_all_variations @ meta-boxes-product-variation.min.js?ver=8.8.3:1 generate_variations
      @ meta-boxes-product-variation.min.js?ver=8.8.3:1 dispatch @ load-scripts.
      php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,
      regenerator-runtime,wp-polyfill,wp-hooks&ver=87076ba087c933f5afa19d77bc17c638:
      2 v.handle @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,
      utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=87076ba087c933f5afa19d77bc17c638:
      2`
    - If you open a new tab and go to this same product, you will see that the product
      variations were created, it’s just a JS bug that’s preventing the display 
      of the AJAX results.
    - We have confirmed this is a bug caused by this extension
       * Launch a new WP instance via [https://wordpress.org/playground/](https://wordpress.org/playground/)
       * Install WC plugin
       * Create new user with role shop manager
       * Log in as new user
       * new user is able to Generate variations
       * Log back in as admin
       * Install and activate **Disable Bloat for WordPress & WooCommerce** plugin
       * Log in as new user
       * new user is unable to Generate variations

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Rock Solid](https://wordpress.org/support/users/mikewire_rocksolid/)
 * (@mikewire_rocksolid)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/plugin-breaks-generate-variations-js-callback/#post-17826652)
 * Hi thanks for the detailed description. We can reproduce this issue, and it seems
   to be caused by the Woocommerce native filter. We will log an issue in their 
   github and hopefully it can be resolved in a future version
 *  Thread Starter [treestonemedia](https://wordpress.org/support/users/treestonemedia/)
 * (@treestonemedia)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/plugin-breaks-generate-variations-js-callback/#post-17831279)
 * [@mikewire_rocksolid](https://wordpress.org/support/users/mikewire_rocksolid/)
   can I please get the link to the github issue so that I can track?
 *  Plugin Contributor [ospiotr](https://wordpress.org/support/users/ospiotr/)
 * (@ospiotr)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/plugin-breaks-generate-variations-js-callback/#post-17833369)
 * Hello [@treestonemedia](https://wordpress.org/support/users/treestonemedia/)
 * Thank you for detailed and top-notch bug report. Good job!
 * There is a problem while using WooCommerce core filter _woocommerce\_admin\_features_
 * I have reported the bug to WooCommerce GitHub by adding a new issue. The bug 
   report is based on your post.
 * Here’s a link: [https://github.com/woocommerce/woocommerce/issues/48576](https://github.com/woocommerce/woocommerce/issues/48576)
 * I hope this one will be confirmed and fixed!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Plugin breaks Generate variations JS callback’ is closed to new replies.

 * ![](https://ps.w.org/disable-dashboard-for-woocommerce/assets/icon-256x256.png?
   rev=2822447)
 * [Disable Bloat for WordPress & WooCommerce](https://wordpress.org/plugins/disable-dashboard-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/disable-dashboard-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/disable-dashboard-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/disable-dashboard-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/disable-dashboard-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/disable-dashboard-for-woocommerce/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [ospiotr](https://wordpress.org/support/users/ospiotr/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/plugin-breaks-generate-variations-js-callback/#post-17833369)
 * Status: not resolved