Merge pull request #876 from woocommerce/PCP-900-onboard-with-pui-checkbox-automatically-set-when-shop-is-set-to-germany

Onboard with PUI Checkbox automatically set when shop is set to Germany
This commit is contained in:
Emili Castells 2022-10-14 09:11:55 +02:00 committed by GitHub
commit ab23dfbe4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View file

@ -189,7 +189,12 @@ class PayUponInvoice {
add_filter(
'ppcp_partner_referrals_data',
function ( array $data ): array {
if ( $this->settings->has( 'ppcp-onboarding-pui' ) && $this->settings->get( 'ppcp-onboarding-pui' ) !== '1' ) {
try {
$onboard_with_pui = $this->settings->get( 'ppcp-onboarding-pui' );
if ( $onboard_with_pui !== '1' ) {
return $data;
}
} catch ( NotFoundException $exception ) {
return $data;
}