diff --git a/src/Block.php b/src/Block.php index c44d498f..662a8cf7 100644 --- a/src/Block.php +++ b/src/Block.php @@ -277,6 +277,13 @@ abstract class Block extends Composer implements BlockContract */ public $apiVersion = null; + /** + * The internal ACF block version. + * + * @var int + */ + public $blockVersion = 2; + /** * Validate block fields as per the field group configuration. * @@ -645,7 +652,7 @@ public function settings(): Collection 'styles' => $this->getStyles(), 'supports' => $this->getSupports(), 'textdomain' => $this->getTextDomain(), - 'acf_block_version' => $this->getApiVersion(), + 'acf_block_version' => $this->blockVersion, 'apiVersion' => $this->getApiVersion(), 'validate' => $this->validate, 'use_post_meta' => $this->usePostMeta, @@ -701,7 +708,7 @@ public function toJson(): string $settings = $this->settings() ->put('name', $this->namespace) ->put('acf', [ - 'blockVersion' => $this->getApiVersion(), + 'blockVersion' => $this->blockVersion, 'mode' => $this->mode, 'postTypes' => $this->post_types, 'renderTemplate' => $this::class,