Title: Can&#8217;t find variable: berocket_remove_filter
Last modified: March 12, 2024

---

# Can’t find variable: berocket_remove_filter

 *  Resolved [Rhand](https://wordpress.org/support/users/rhand/)
 * (@rhand)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/cant-find-variable-berocket_remove_filter/)
 * Using
 * `berocket_remove_filter`
 * In custom JS using
 *     ```wp-block-code
       ...
       jQuery(document).ready(function ($) {
       // remove default filter hooks
       berocket_remove_filter('update_products', braapf_update_products);
       berocket_remove_filter('update_products',   braapf_close_tippy);
       berocket_remove_filter('update_products',   braapf_update_products_search_field, 2);
       // init request
       var currentRequest = null,
       timeout = null;
       ...
       });
       ```
   
 * But is seems to not load on time and or clash with `wp-content/plugins/woocommerce-
   ajax-filters/includes/compatibility/divi-theme-builder.php`
 * Our script is loaded with
 *     ```wp-block-code
       <?php if ($header): ?>
       <script type="text/javascript" src="<?php echo( CONSTANT_URL . '/assets/js/file.js?v=' . CONSTANT_VERSION ); ?>"></script>
       <?php endif ?>
       ```
   
 * 
   on `wp-content/plugins/plugin-name-slug/templates/product-list.php` .Any suggestions
   to improve our addition to work in tandem with plugin?
    -  This topic was modified 2 years, 2 months ago by [Rhand](https://wordpress.org/support/users/rhand/).
    -  This topic was modified 2 years, 2 months ago by [Rhand](https://wordpress.org/support/users/rhand/).

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

 *  Plugin Author [RazyRx](https://wordpress.org/support/users/razyrx/)
 * (@razyrx)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/cant-find-variable-berocket_remove_filter/#post-17494064)
 * Hello,
   It is better to use this code instead document ready
 *     ```wp-block-code
       if ( typeof(berocket_add_filter) == 'function' ) {
           //part of code to remove filters
       } else {
           jQuery(document).on('berocket_hooks_ready', function() {
               //part of code to remove filters
           });
       }
       ```
   
 * What exactly issue do you have with “includes/compatibility/divi-theme-builder.
   php” file?
   Regards,Oleg
 *  Thread Starter [Rhand](https://wordpress.org/support/users/rhand/)
 * (@rhand)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/cant-find-variable-berocket_remove_filter/#post-17499631)
 * Thanks for the feedback. Will look into these options.

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

The topic ‘Can’t find variable: berocket_remove_filter’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-ajax-filters/assets/icon-256x256.gif?rev=2770304)
 * [Advanced AJAX Product Filters](https://wordpress.org/plugins/woocommerce-ajax-filters/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-ajax-filters/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-ajax-filters/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-ajax-filters/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-ajax-filters/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-ajax-filters/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Rhand](https://wordpress.org/support/users/rhand/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/cant-find-variable-berocket_remove_filter/#post-17499631)
 * Status: resolved