@@ -277,6 +277,13 @@ abstract class Block extends Composer implements BlockContract
277
277
*/
278
278
public $ apiVersion = null ;
279
279
280
+ /**
281
+ * The internal ACF block version.
282
+ *
283
+ * @var int
284
+ */
285
+ public $ blockVersion = 2 ;
286
+
280
287
/**
281
288
* Validate block fields as per the field group configuration.
282
289
*
@@ -645,7 +652,7 @@ public function settings(): Collection
645
652
'styles ' => $ this ->getStyles (),
646
653
'supports ' => $ this ->getSupports (),
647
654
'textdomain ' => $ this ->getTextDomain (),
648
- 'acf_block_version ' => $ this ->getApiVersion () ,
655
+ 'acf_block_version ' => $ this ->blockVersion ,
649
656
'apiVersion ' => $ this ->getApiVersion (),
650
657
'validate ' => $ this ->validate ,
651
658
'use_post_meta ' => $ this ->usePostMeta ,
@@ -701,7 +708,7 @@ public function toJson(): string
701
708
$ settings = $ this ->settings ()
702
709
->put ('name ' , $ this ->namespace )
703
710
->put ('acf ' , [
704
- 'blockVersion ' => $ this ->getApiVersion () ,
711
+ 'blockVersion ' => $ this ->blockVersion ,
705
712
'mode ' => $ this ->mode ,
706
713
'postTypes ' => $ this ->post_types ,
707
714
'renderTemplate ' => $ this ::class,
0 commit comments