mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #3143 from woocommerce/PCP-4245-undefined-array-key-block-editor-in-styling-settings-map-helper-php-line-179
Fix the warning message related to the 'block-editor' location (4245)
This commit is contained in:
commit
9f78224d75
1 changed files with 4 additions and 2 deletions
|
@ -224,9 +224,10 @@ class StylingSettingsMapHelper {
|
|||
protected function mapped_disabled_funding_value( array $styling_models ): ?array {
|
||||
$disabled_funding = array();
|
||||
$locations_to_context_map = $this->current_context_to_new_button_location_map();
|
||||
$current_context = $locations_to_context_map[ $this->context() ] ?? '';
|
||||
|
||||
foreach ( $styling_models as $model ) {
|
||||
if ( $model->location !== $locations_to_context_map[ $this->context() ] || in_array( 'venmo', $model->methods, true ) ) {
|
||||
if ( $model->location !== $current_context || in_array( 'venmo', $model->methods, true ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -252,10 +253,11 @@ class StylingSettingsMapHelper {
|
|||
}
|
||||
|
||||
$locations_to_context_map = $this->current_context_to_new_button_location_map();
|
||||
$current_context = $locations_to_context_map[ $this->context() ] ?? '';
|
||||
|
||||
foreach ( $styling_models as $model ) {
|
||||
if ( ! $model->enabled
|
||||
|| $model->location !== $locations_to_context_map[ $this->context() ]
|
||||
|| $model->location !== $current_context
|
||||
|| ! in_array( $button_name, $model->methods, true )
|
||||
) {
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue