Skip to content

Commit

Permalink
Do no load messaging (or paypal sdk) when disabled in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexP11223 committed Dec 20, 2023
1 parent 1962823 commit f4ac440
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/ppcp-button/src/Assets/SmartButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,10 @@ public function should_load_messages() : bool {
return false;
}

if ( ! $this->settings_status->is_pay_later_messaging_enabled() ) {
return false;
}

if ( ! $this->messages_apply->for_country() || $this->is_free_trial_cart() ) {
return false;
}
Expand Down

0 comments on commit f4ac440

Please sign in to comment.