Merge pull request #3099 from woocommerce/PCP-4214-the-styling-tab-data-isnt-showing-on-frontend

Force enabled the styling per location option (4214)
This commit is contained in:
Emili Castells 2025-02-13 15:02:04 +01:00 committed by GitHub
commit b74ad84030
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,11 +40,12 @@ class StylingSettingsMapHelper {
public function map(): array {

$mapped_settings = array(
'smart_button_locations' => '',
'pay_later_button_locations' => '',
'disable_funding' => '',
'googlepay_button_enabled' => '',
'applepay_button_enabled' => '',
'smart_button_locations' => '',
'pay_later_button_locations' => '',
'disable_funding' => '',
'googlepay_button_enabled' => '',
'applepay_button_enabled' => '',
'smart_button_enable_styling_per_location' => '',
);

foreach ( $this->locations_map() as $old_location_name => $new_location_name ) {
@ -70,6 +71,9 @@ class StylingSettingsMapHelper {
case 'smart_button_locations':
return $this->mapped_smart_button_locations_value( $styling_models );

case 'smart_button_enable_styling_per_location':
return true;

case 'pay_later_button_locations':
return $this->mapped_pay_later_button_locations_value( $styling_models );