This commit is contained in:
Pedro Silva 2023-09-27 08:47:48 +01:00
parent 82c143c5b6
commit 59219009c3
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
2 changed files with 9 additions and 6 deletions

View file

@ -121,11 +121,14 @@ class UpdateSignupLinksEndpoint implements EndpointInterface {
$data = $this->request_data->read_request( $this->nonce() );
foreach ( $data['settings'] ?? array() as $field => $value ) {
$option = apply_filters( 'ppcp_partner_referrals_option', array(
'field' => $field,
'value' => $value,
'valid' => false,
) );
$option = apply_filters(
'ppcp_partner_referrals_option',
array(
'field' => $field,
'value' => $value,
'valid' => false,
)
);
if ( $option['valid'] ) {
$this->settings->set( $field, $value );

View file

@ -200,7 +200,7 @@ return array(
return $ppcp_tab ? $ppcp_tab : $section;
},
'wcgateway.settings' => SingletonDecorator::make(
'wcgateway.settings' => SingletonDecorator::make(
static function ( ContainerInterface $container ): Settings {
$default_button_locations = $container->get( 'wcgateway.button.default-locations' );
return new Settings( $default_button_locations );