Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

Conflict with Woocommerce Back End Search

bugordersSearchwoocommerce
    • 4 years, 8 months ago rebeccaolson
      Participant

      Expired

      Hello – I just discovered that I can no longer search for orders in the backend of the store. If I go to Woocommerce>Orders and enter any search (customer name, order number, etc.) in the search box and hit “search orders” it returns with “no results found”. What is even more odd, if I delete the previous search term (while still in the “no results found” screen) and type in a new term and search, I am taken out of Orders and sent to Products (still with “no results found”).

      I am unsure how this is related to Tower since it is happening within the Woocommerce plugin, but I have tested the site, and the issue resolves itself if I switch to another theme.

      Your site/login credentials are updated in my profile and the staging site is up to date as of right now, and available for you to dig around in.

    • 4 years, 8 months ago azam
      Keymaster

      Hi,
      Yes, I have checked it is not working and again bit complex issue, I will update you again on it.

      Thanks,

    • 4 years, 8 months ago azam
      Keymaster

      Rebccaolson,
      I can confirm this issue is arising due to your custom scripting. Please check on your end.

      Thanks,

    • 4 years, 7 months ago rebeccaolson
      Participant

      Expired

      Azam – Can you clarify what custom scripting is causing the issue? I’m not a developer, so anything custom in my scripting has come from Tower in response to other bugs/issues in the theme.

    • 4 years, 7 months ago azam
      Keymaster

      Rebeccaolson,
      Yes, Custom Scripting You have done or your Developer and Those are not relted to Tower Bugs / issues.

      Thanks,

    • 4 years, 7 months ago rebeccaolson
      Participant

      Expired

      Can you clarify *which* “custom scripting” you are referring to? I do not have a developer, so anything custom in my site has come from Tower to help address bugs/issues as they’ve come up over the years. Perhaps it isn’t necessary anymore, if you were able to fix it on the staging site – so I’m happy to remove the custom scripting that is causing the conflict, if you tell me what it is.

    • 4 years, 7 months ago azam
      Keymaster

      Rebecca,
      Your child theme has a custom scripting and you were working yourself.
      This is not our code.

      Thanks,

    • 4 years, 7 months ago rebeccaolson
      Participant

      Expired

      This must have been from long ago when the site was set up. All I’m asking if you can tell me which custom scripting is causing the conflict? Or do you not know?

    • 4 years, 7 months ago rebeccaolson
      Participant

      Expired

      Azam – I just deleted the entirety of the code in Tower-child CSS, and the issue still exists. Is the issue with something in the functions.php file? Or something else? I’d rather not delete everything in my Child Theme, if it’s just one thing causing the glitch.

      I’ve spent hours going over all the code in my live site Child Theme, comparing it to the code in the staging site Child Theme, and I cannot find the difference. Can you please tell me what you changed/removed to make the staging site function? If you could please just point me in the right direction, I would be very grateful.

      • This reply was modified 4 years, 7 months ago by rebeccaolson.
    • 4 years, 7 months ago azam
      Keymaster

      Rebeccaolson,
      In child theme in our theme there is no search.php but you theme is having.
      Our Tower > Child themes’s function.php file consist only few lines but
      and compare it with this one.

      This were code is conflicting and I am not sure your some plug-in or some developer added extra codes.

      I hope you understand the situtiono better now, I have to spent 2 hours approximately to find out exact piece of code which is creating an issue.

      How I did, I just added default function.php and tested your order search coming smoothly.

      Thanks,

    • 4 years, 7 months ago rebeccaolson
      Participant

      Expired

      Azam – so just to clarify: Is it the search.php or function.php file that is causing the issue? Or both?

      You are saying you don’t know which code in the file is causing the malfunction, and I need to delete the entire child theme function.php file and start over from scratch?

    • 4 years, 7 months ago azam
      Keymaster

      it is functions.php code that is causing the problem in tower child theme.

    • 4 years, 7 months ago Ludjon
      Keymaster

      Hi Rebecca,

      I found out on functions.php of the child-theme that you have added a filter when querying products. I have added a custom code, so this piece of extra code will not be run on the admin dashboard.

      I am pretty sure that this code was not added by us.
      Please check now.

      Thanks

    • 4 years, 7 months ago Ludjon
      Keymaster

      Also, can you send me the extended support item license purchase code as a private reply?

      Thank You

    • 4 years, 7 months ago rebeccaolson
      Participant

      Expired

      Ludjon – thank you for your help, but unfortunately that didn’t work either. I still was not able to search backend Woocommerce orders.

      I definitely didn’t expect you to spend the time to write new code for me! I was just hoping someone could tell me what code I needed to remove (or have someone take a look at) that was causing the theme to malfunction. Since I now know that it was the search code (trying to filter results to show only products, not blog posts,) that was causing the issue, I have simply removed that code from functions.php and the site is operating again.

      Here is the code that was causing the issue below, in case anyone runs across this thread in the future:

      //Only show products in the front-end search results
      function lw_search_filter_pages($query) {
      if ($query->is_search) {
      $query->set(‘post_type’, ‘product’);
      $query->set( ‘wc_query’, ‘product_query’ );
      }
      return $query;
      }

      Thanks!
      Rebecca

    • 4 years, 7 months ago azam
      Keymaster

      Rebecca,

      Let me know if you have any further Question.

      Thanks,

Viewing 15 reply threads

You must be logged in to reply to this topic.

Login

Log In
Register

Renew Support

  • Renew Specular Support
  • Renew Tower Support
  • Renew Folie Support
  • Renew Handel Support
  • Renew June Support
  • Renew Picante Support
  • Renew Thype Support
  • Renew Regn Support

Search Forums

Forums

  • Bygge – Construction Theme
  • Converta – Software Theme
  • Folie – The WordPress Website Builder
  • Handel – Responsive Multi-Purpose Business Theme
  • June WooCommerce WordPress Theme
  • Livecast – Podcast Theme
  • Picante – Restaurant & Food WordPress Theme
  • Regn | Agency & Business WordPress Theme
  • Remake – Minimal Portfolio & Agency Theme
  • Specular – Multi-Purpose WordPress Theme
  • Suggest us Features
  • Tower – Business-Driven Multipurpose WP Theme
  • Vibrance – Photography Theme

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password