Skip to content

Commit

Permalink
feat: Define block name identifier constant
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdiyazdani committed Jul 27, 2024
1 parent ab92a3f commit 3bfa362
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/WooCommerce/Block/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ class Block implements IntegrationInterface {
*/
const NAME = '_woo_additional_terms';

/**
* The name of the block.
*
* @since 1.6.7
*
* @return string
*/
const IDENTIFIER = 'mypreview/woo-additional-terms';

/**
* The name of the integration.
*
Expand Down Expand Up @@ -60,7 +69,7 @@ public function initialize() {
*/
public function add_attributes_to_frontend_blocks( $allowed_blocks ) {

$allowed_blocks[] = 'mypreview/woo-additional-terms';
$allowed_blocks[] = self::IDENTIFIER;

return $allowed_blocks;
}
Expand Down

0 comments on commit 3bfa362

Please sign in to comment.