Title: Output buffer issue
Last modified: December 19, 2019

---

# Output buffer issue

 *  Resolved [Nextendweb](https://wordpress.org/support/users/nextendweb/)
 * (@nextendweb)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/output-buffer-issue/)
 * Hi [@calinvingan](https://wordpress.org/support/users/calinvingan/),
    I’m the
   developer of Smart Slider 3 and one of our customer informed us about a conflict
   between your plugin + WPRocket + Smart Slider. We do use output buffer too and
   in the past I gained a lot of experience in this topic. I checked your code and
   made a fix which should work in every case. 🙂
 * Edit the class `SQ_Models_Frontend`
 * Remove: `private $_buffer = false;`
 * Replace `getBuffer` method with:
 *     ```
       /**
        * Get the loaded buffer and change it
        *
        * @param string $buffer
        * @param int  $phase
        * @return string
        */
       public function getBuffer($buffer, $phase) {
   
       	if ($phase & PHP_OUTPUT_HANDLER_FINAL || $phase & PHP_OUTPUT_HANDLER_END) {
       		return apply_filters('sq_buffer', $buffer);
       	}
   
       	return $buffer;
       }
       ```
   
 * The key is to use the $phase variable. Probably you have those “tricks” in the
   original source to run it only once.

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Calin Vingan](https://wordpress.org/support/users/calinvingan/)
 * (@calinvingan)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/output-buffer-issue/#post-12253823)
 * Thank you for your suggestion. Really appreciate it.
 * We will check your code and implement it in the plugin if it’s working with all
   our test cases.
 * Best regards,
    Calin

Viewing 1 replies (of 1 total)

The topic ‘Output buffer issue’ is closed to new replies.

 * ![](https://ps.w.org/squirrly-seo/assets/icon-256x256.png?rev=2724476)
 * [SEO Plugin by Squirrly SEO](https://wordpress.org/plugins/squirrly-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/squirrly-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/squirrly-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/squirrly-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/squirrly-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/squirrly-seo/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Calin Vingan](https://wordpress.org/support/users/calinvingan/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/output-buffer-issue/#post-12253823)
 * Status: resolved