• I saw how you can change the root category “Select category”, but is there a way to change it for each individual subcategory?

    For instance, I’m looking for…

    Select a Brand > Select a Surgical Speciality > Select a Type

Viewing 1 replies (of 1 total)
  • Plugin Author Pektsekye

    (@pektsekye)

    Hello,

    Try to replace the code:

    
          var select = this.element.find('.pcd-select').last();
          
          select[0].options[0] = new Option(this.categoryDefOptionTitle, '');
    

    with:

    
          var selects = this.element.find('.pcd-select');   
          
          var selectTitles = ["-- select category --", "-- select sub category --", "-- select sub sub category --"];
    
          var ind = selects.length - 1;     
          var title = selectTitles[ind] ? selectTitles[ind] : this.categoryDefOptionTitle;
    
          var select = selects.last();            
          select[0].options[0] = new Option(title, '');
    
    

    in the file:
    wp-content/plugins/product-category-dropdowns/view/frontend/web/main.js

    Then refresh the updated .js file in your browser.

    Stanislav

Viewing 1 replies (of 1 total)
  • The topic ‘Change Subcategory Title’ is closed to new replies.