Remove duplicate is_pay_later_filter_enabled_for_location condition check

This commit is contained in:
Pedro Silva 2023-07-13 16:10:59 +01:00
parent d71e09bd09
commit 1df151fd49
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3

View file

@ -386,10 +386,6 @@ class SmartButton implements SmartButtonInterface {
return false;
}
if ( ! $this->is_pay_later_filter_enabled_for_location( $this->context() ) ) {
return false;
}
$selected_locations = $this->settings->has( 'pay_later_messaging_locations' ) ? $this->settings->get( 'pay_later_messaging_locations' ) : array();
$not_enabled_on_cart = ! in_array( 'cart', $selected_locations, true );