Merged in release/release-1.09 (pull request #10)

Release/release 1.09

* Install missing plugins 
* rs set to 1

* rebase pantheon for aws

* rebase pantheon for aws

* prod config change

* prod config change

* fix campaing issue

* revert


Approved-by: Jay Sharma
This commit is contained in:
Rachit Bhargava
2023-12-27 20:55:58 +00:00
committed by Jay Sharma
parent 779393381f
commit 22f10a9edd
2154 changed files with 22313 additions and 209875 deletions

View File

@@ -31,21 +31,21 @@ class AbstractBlock implements BlockInterface {
*
* @var int
*/
private $order = 10000;
private $order = 10;
/**
* The block attributes.
*
* @var array
*/
private $attributes = array();
private $attributes = [];
/**
* The block hide conditions.
*
* @var array
*/
private $hide_conditions = array();
private $hide_conditions = [];
/**
* The block hide conditions counter.
@@ -54,20 +54,6 @@ class AbstractBlock implements BlockInterface {
*/
private $hide_conditions_counter = 0;
/**
* The block disable conditions.
*
* @var array
*/
private $disable_conditions = array();
/**
* The block disable conditions counter.
*
* @var int
*/
private $disable_conditions_counter = 0;
/**
* The block template that this block belongs to.
*
@@ -119,12 +105,6 @@ class AbstractBlock implements BlockInterface {
$this->add_hide_condition( $hide_condition['expression'] );
}
}
if ( isset( $config[ self::DISABLE_CONDITIONS_KEY ] ) ) {
foreach ( $config[ self::DISABLE_CONDITIONS_KEY ] as $disable_condition ) {
$this->add_disable_condition( $disable_condition['expression'] );
}
}
}
/**
@@ -248,18 +228,9 @@ class AbstractBlock implements BlockInterface {
// Storing the expression in an array to allow for future expansion
// (such as adding the plugin that added the condition).
$this->hide_conditions[ $key ] = array(
$this->hide_conditions[ $key ] = [
'expression' => $expression,
);
/**
* Action called after a hide condition is added to a block.
*
* @param BlockInterface $block The block.
*
* @since 8.4.0
*/
do_action( 'woocommerce_block_template_after_add_hide_condition', $this );
];
return $key;
}
@@ -271,15 +242,6 @@ class AbstractBlock implements BlockInterface {
*/
public function remove_hide_condition( string $key ) {
unset( $this->hide_conditions[ $key ] );
/**
* Action called after a hide condition is removed from a block.
*
* @param BlockInterface $block The block.
*
* @since 8.4.0
*/
do_action( 'woocommerce_block_template_after_remove_hide_condition', $this );
}
/**
@@ -288,41 +250,4 @@ class AbstractBlock implements BlockInterface {
public function get_hide_conditions(): array {
return $this->hide_conditions;
}
/**
* Add a disable condition to the block.
*
* The disable condition is a JavaScript-like expression that will be evaluated on the client to determine if the block should be hidden.
* See [@woocommerce/expression-evaluation](https://github.com/woocommerce/woocommerce/blob/trunk/packages/js/expression-evaluation/README.md) for more details.
*
* @param string $expression An expression, which if true, will disable the block.
*/
public function add_disable_condition( string $expression ): string {
$key = 'k' . $this->disable_conditions_counter;
$this->disable_conditions_counter++;
// Storing the expression in an array to allow for future expansion
// (such as adding the plugin that added the condition).
$this->disable_conditions[ $key ] = array(
'expression' => $expression,
);
return $key;
}
/**
* Remove a disable condition from the block.
*
* @param string $key The key of the disable condition to remove.
*/
public function remove_disable_condition( string $key ) {
unset( $this->disable_conditions[ $key ] );
}
/**
* Get the disable conditions of the block.
*/
public function get_disable_conditions(): array {
return $this->disable_conditions;
}
}