Title: wpfSelectedParameters
Last modified: September 6, 2023

---

# wpfSelectedParameters

 *  Resolved [ullemanden95](https://wordpress.org/support/users/ullemanden95/)
 * (@ullemanden95)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/wpfselectedparameters/)
 * Hello!
   im currently trying to achive some functionallity through the js editor.
   i find the behavior of the wpfSelectedParameters abit odd, as when i delete 1
   of them, all of them will get removed.. i tried to implement some custom code,
   but i need the filter to update the products shown aswell.
 *     ```wp-block-code
       // Code to handle removal of wpfSelectedParameters individually //
   
       $(document).ready(function() {
           const container = document.querySelector('.wpfSelectedParameters');
           if (container) {
               container.addEventListener('click', function(event) {
                   if (event.target.classList.contains('wpfSelectedDelete')) {
                       if (canRemoveParameter()) {
                           event.target.closest('.wpfSelectedParameter').remove();
                       }
                   }
               });
           }
   
           function canRemoveParameter() {
               return true;  // Always allow removal
           }
       });
   
   
       // Need a way to update the filter upon removal of wpfSelectedParameters //
       ```
   
 * (note)
   is there a solution to this within the plugin, or is it something i have
   to figure out myself?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwpfselectedparameters%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [WBW Plugins](https://wordpress.org/support/users/woobewoo/)
 * (@woobewoo)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/wpfselectedparameters/#post-17034477)
 * Hello [@ullemanden95](https://wordpress.org/support/users/ullemanden95/),
 * It’s not clear what “when i delete 1 of them, all of them will get removed” means.
 * We can delete all selected parameters one by one.
 * Perhaps this is some kind of bug. Otherwise, it’s not clear what you want to 
   do with a custom script.
 *  Thread Starter [ullemanden95](https://wordpress.org/support/users/ullemanden95/)
 * (@ullemanden95)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/wpfselectedparameters/#post-17034812)
 * what i mean is.. 
   i activated (inside the plugin) that when i select a parameter
   for my filter, the wpfSelectedParameters will spawn in, so costumers can see 
   what parameters they searched for.
 * when i have choosen some parameters, and want to get rid of only 1 of them, to
   then show the results of the other parameters (and NOT the removed one). i clicked
   the “x” on the one i wanted to remove, but all the parameters got removed.
 * this is what im trying to bypass with the code i made. i wont borther you more
   than necessary, so i kind of just need to know what code update the filter. ill
   just make the filter update as i remove a parameter.
    -  This reply was modified 2 years, 9 months ago by [ullemanden95](https://wordpress.org/support/users/ullemanden95/).
    -  This reply was modified 2 years, 9 months ago by [ullemanden95](https://wordpress.org/support/users/ullemanden95/).
 *  Plugin Author [WBW Plugins](https://wordpress.org/support/users/woobewoo/)
 * (@woobewoo)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/wpfselectedparameters/#post-17041046)
 * Hi,
 * The parameters of the selected filters must be deleted one at a time. And I was
   not able to reproduce a situation in which the behavior you described would be
   repeated.
 * Most likely this is some kind of conflict with the theme or another plugin.
 * Please contact our internal support team – [https://woobewoo.com/contact-us/](https://woobewoo.com/contact-us/)

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

The topic ‘wpfSelectedParameters’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woo-product-filter_a0a6df.svg)
 * [Product Filter for WooCommerce by WBW](https://wordpress.org/plugins/woo-product-filter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-product-filter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-product-filter/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-product-filter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-product-filter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-product-filter/reviews/)

## Tags

 * [export](https://wordpress.org/support/topic-tag/export/)
 * [product filter](https://wordpress.org/support/topic-tag/product-filter/)
 * [product search](https://wordpress.org/support/topic-tag/product-search/)
 * [script](https://wordpress.org/support/topic-tag/script/)

 * 3 replies
 * 2 participants
 * Last reply from: [WBW Plugins](https://wordpress.org/support/users/woobewoo/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/wpfselectedparameters/#post-17041046)
 * Status: resolved