Skip to content

2.9.3 breaks all our wc_ajax calls on our site #1303

@MajorChump

Description

@MajorChump

Hello,

I've not been able to diagnose why this is happening yet. This morning we came in and none of our wc_ajax calls had any response in the body. We believe it must have been an ob_start being left open so we closed them all before the response in wp_send_json. We added

...
while ( ob_get_level() > 0 ) {
      error_log( 'MK: closing ob level ' . ob_get_level() );
      ob_end_flush();
  }

echo wp_json_encode( $response, $flags );

This proved the issue and resolved it.

Once we started debugging we found the issue was coming from w3totalcache, reverting back to 2.9.2 and the issue was resolved again so I believe something has changed which is now leaving open an ob_start on ajax calls.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions