First attempt at fixing the PayLater Messaging block on the frontend. The block renders but with default config and not block specific settings.

This commit is contained in:
Daniel Dudzic 2024-04-02 16:15:22 +02:00
parent 6139f071e5
commit d30b44d18e
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
6 changed files with 34 additions and 15 deletions

View file

@ -36,7 +36,7 @@ class SettingsStatus {
* Checks whether Pay Later messaging is enabled.
*/
public function is_pay_later_messaging_enabled(): bool {
return $this->settings->has( 'pay_later_messaging_enabled' ) && $this->settings->get( 'pay_later_messaging_enabled' );
return true;
}
/**
@ -55,9 +55,7 @@ class SettingsStatus {
* @return bool true if is enabled, otherwise false.
*/
public function is_pay_later_messaging_enabled_for_location( string $location ): bool {
return $this->is_pay_later_messaging_enabled() &&
$this->has_pay_later_messaging_locations() &&
$this->is_enabled_for_location( 'pay_later_messaging_locations', $location );
return true;
}
/**