Limit Pay Later Messaging block to only 1 per page. Fix Pay Later WC blocks messaging. Ensure proper config renders both in the editor and the page.

This commit is contained in:
Daniel Dudzic 2024-04-08 23:35:53 +02:00
parent d30b44d18e
commit 64bd0a2da8
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
37 changed files with 3911 additions and 219 deletions

View file

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