Unverified Commit 5ca3e143 authored by Bastien Ho's avatar Bastien Ho Committed by GitHub

Do not parse shortcodes in REST context

 which breaks saving in Gutenberg editor
parent 0e900d48
......@@ -246,7 +246,11 @@ class CiviCRM_For_WordPress_Shortcodes {
* @return string HTML for output
*/
public function render_single( $atts ) {
// Do not parse shortcodes in REST context, which breaks saving in Gutenberg editor
if(defined('REST_REQUEST') && REST_REQUEST){
return;
}
// check if we've already parsed this shortcode
global $post;
if ( is_object($post) ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment