flush_rewrite_rules running() in all pages

WCMp Vendor Staff

flush_rewrite_rules running() in all pages Resolved

Viewing 2 reply threads
  • Author
    Posts
    • #29240
      webmaster.mid
      Participant

      Hi,
      I noticed that plugin WCMp Vendor Staff is running the flush_rewrite_rules() on all pages requests, both frontend and admin. It is a bad practice, according to wp docs: “Flushing the rewrite rules is an expensive operation, there are tutorials and examples that suggest executing it on the ‘init’ hook. This is bad practice.”

      I think you already have a draft to manage this, since in the wcmp-sub_vendor/classes/class-wcmp-sub-vendor.php in line 329 has a commented line:

      //update_option('vendor_staff_added', 1);
      Copy

      Actually I uncommented the line and the the problem resolved. Can you update the plugin code? Is there any reason to leave that line commented?

      If the plugin have a public repository, I can send a pull request for that. Thanks!

    • #29336
      WCMp Admin
      Keymaster

      Hi @webmaster.mid, thanks for sharing us this.

      We will soon start working on the update of Vendor Staff and resolve this issue.

      We will keep you posted.

    • #30131
      WCMp Admin
      Keymaster

      Hi @webmaster.mid, we have fixed the issue in our latest update (version 1.1.1)

      Please update the plugin and confirm the same.

Viewing 2 reply threads

The topic ‘flush_rewrite_rules running() in all pages’ is closed to new replies.

Buy all Marketplace addons together, check out our Bundle

Buy at Slashed Price