mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
Fix saving the block config
This commit is contained in:
parent
012c7281f7
commit
155677934a
1 changed files with 4 additions and 1 deletions
|
@ -99,10 +99,13 @@ class SaveConfig {
|
|||
$this->settings->set( 'pay_later_messaging_enabled', true );
|
||||
|
||||
$enabled_locations = array();
|
||||
|
||||
foreach ( $config as $placement => $data ) {
|
||||
$this->save_config_for_location( $data, $placement );
|
||||
|
||||
if ( $placement === 'custom_placement' ) {
|
||||
$data = $data[0] ?? array();
|
||||
}
|
||||
|
||||
if ( $data['status'] === 'enabled' ) {
|
||||
$enabled_locations[] = $placement;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue