Gets the soft descriptor. * * @return string The soft descriptor. */ public function get_soft_descriptor(): string { return $this->data['soft_descriptor']; } /** * Sets the soft descriptor. * * @param string $descriptor The soft descriptor to set. */ public function set_soft_descriptor(string $descriptor): void { $descriptor = $this->sanitizer->sanitize_text($descriptor); $descriptor = preg_replace('/[^a-zA-Z0-9\-*. ]/', '', $descriptor) ?? ''; $this->data['soft_descriptor'] = substr($descriptor, 0, 22); } /** * Gets the subtotal adjustment setting. * * @return string The subtotal adjustment setting. */ public function get_subtotal_adjustment(): string { return $this->data['subtotal_adjustment']; } /** * Sets the subtotal adjustment setting. * * @param string $adjustment The subtotal adjustment to set. */ public function set_subtotal_adjustment(string $adjustment): void { $this->data['subtotal_adjustment'] = $this->sanitizer->sanitize_enum($adjustment, self::SUBTOTAL_ADJUSTMENT_OPTIONS); } /** * Gets the landing page setting. * * @return string The landing page setting. */ public function get_landing_page(): string { return $this->data['landing_page']; } /** * Sets the landing page setting. * * @param string $page The landing page to set. */ public function set_landing_page(string $page): void { $this->data['landing_page'] = $this->sanitizer->sanitize_enum($page, self::LANDING_PAGE_OPTIONS); } /** * Gets the button language setting. * * @return string The button language. */ public function get_button_language(): string { return $this->data['button_language']; } /** * Sets the button language. * * @param string $language The button language to set. */ public function set_button_language(string $language): void { $this->data['button_language'] = $this->sanitizer->sanitize_text($language); } /** * Gets the 3D Secure setting. * * @return string The 3D Secure setting. */ public function get_three_d_secure(): string { return $this->data['three_d_secure']; } /** * Sets the 3D Secure setting. * * @param string $setting The 3D Secure setting to set. */ public function set_three_d_secure(string $setting): void { $this->data['three_d_secure'] = $this->sanitizer->sanitize_enum($setting, self::THREE_D_SECURE_OPTIONS); } /** * Gets the authorize only setting. * * @return bool True if authorize only is enabled, false otherwise. */ public function get_authorize_only(): bool { return $this->data['authorize_only']; } /** * Sets the authorize only setting. * * @param bool $authorize Whether to enable authorize only. */ public function set_authorize_only(bool $authorize): void { $this->data['authorize_only'] = $this->sanitizer->sanitize_bool($authorize); } /** * Gets the capture virtual orders setting. * * @return bool True if capturing virtual orders is enabled, false otherwise. */ public function get_capture_virtual_orders(): bool { return $this->data['capture_virtual_orders']; } /** * Sets the capture virtual orders setting. * * @param bool $capture Whether to capture virtual orders. */ public function set_capture_virtual_orders(bool $capture): void { $this->data['capture_virtual_orders'] = $this->sanitizer->sanitize_bool($capture); } /** * Gets the save PayPal and Venmo setting. * * @return bool True if saving PayPal and Venmo is enabled, false otherwise. */ public function get_save_paypal_and_venmo(): bool { return $this->data['save_paypal_and_venmo']; } /** * Sets the save PayPal and Venmo setting. * * @param bool $save Whether to save PayPal and Venmo. */ public function set_save_paypal_and_venmo(bool $save): void { $this->data['save_paypal_and_venmo'] = $this->sanitizer->sanitize_bool($save); } /** * Gets the custom-shipping-contact flag ("Contact Module"). * * @return bool True if the contact module feature is enabled, false otherwise. */ public function get_enable_contact_module(): bool { return $this->data['enable_contact_module']; } /** * Sets the custom-shipping-contact flag ("Contact Module"). * * @param bool $save Whether to use the contact module feature. */ public function set_enable_contact_module(bool $save): void { $this->data['enable_contact_module'] = $this->sanitizer->sanitize_bool($save); } /** * Gets the save card details setting. * * @return bool True if saving card details is enabled, false otherwise. */ public function get_save_card_details(): bool { return $this->data['save_card_details']; } /** * Sets the save card details setting. * * @param bool $save Whether to save card details. */ public function set_save_card_details(bool $save): void { $this->data['save_card_details'] = $this->sanitizer->sanitize_bool($save); } /** * Gets the enable Pay Now setting. * * @return bool True if Pay Now is enabled, false otherwise. */ public function get_enable_pay_now(): bool { return $this->data['enable_pay_now']; } /** * Sets the enable Pay Now setting. * * @param bool $enable Whether to enable Pay Now. */ public function set_enable_pay_now(bool $enable): void { $this->data['enable_pay_now'] = $this->sanitizer->sanitize_bool($enable); } /** * Gets the enable logging setting. * * @return bool True if logging is enabled, false otherwise. */ public function get_enable_logging(): bool { return $this->data['enable_logging']; } /** * Sets the enable logging setting. * * @param bool $enable Whether to enable logging. */ public function set_enable_logging(bool $enable): void { $this->data['enable_logging'] = $this->sanitizer->sanitize_bool($enable); } /** * Gets the disabled cards. * * @return array The array of disabled cards. */ public function get_disabled_cards(): array { return $this->data['disabled_cards']; } /** * Sets the disabled cards. * * @param array $cards The array of cards to disable. */ public function set_disabled_cards(array $cards): void { $this->data['disabled_cards'] = array_map(array($this->sanitizer, 'sanitize_text'), $cards); } }
Fatal error: Uncaught Error: Class "WooCommerce\PayPalCommerce\Settings\Data\SettingsModel" not found in /htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-settings/services.php:105 Stack trace: #0 /htdocs/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Inpsyde/Modularity/Container/ReadOnlyContainer.php(58): WooCommerce\PayPalCommerce\Settings\SettingsModule::WooCommerce\PayPalCommerce\Settings\{closure}(Object(WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer)) #1 /htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-compat/services.php(104): WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer->get('settings.data.s...') #2 /htdocs/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Inpsyde/Modularity/Container/ReadOnlyContainer.php(58): WooCommerce\PayPalCommerce\Compat\CompatModule::WooCommerce\PayPalCommerce\Compat\{closure}(Object(WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer)) #3 /htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-compat/services.php(131): WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer->get('compat.setting....') #4 /htdocs/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Inpsyde/Modularity/Container/ReadOnlyContainer.php(58): WooCommerce\PayPalCommerce\Compat\CompatModule::WooCommerce\PayPalCommerce\Compat\{closure}(Object(WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer)) #5 /htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway/services.php(169): WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer->get('compat.settings...') #6 [internal function]: WooCommerce\PayPalCommerce\WcGateway\WCGatewayModule::WooCommerce\PayPalCommerce\WcGateway\{closure}(Object(WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer)) #7 /htdocs/wp-content/plugins/woocommerce-paypal-payments/lib/common/Pattern/SingletonDecorator.php(60): call_user_func_array(Object(Closure), Array) #8 /htdocs/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Inpsyde/Modularity/Container/ReadOnlyContainer.php(58): WooCommerce\PayPalCommerce\Common\Pattern\SingletonDecorator->__invoke(Object(WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer)) #9 /htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-save-payment-methods/src/SavePaymentMethodsModule.php(76): WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer->get('wcgateway.setti...') #10 /htdocs/wp-includes/class-wp-hook.php(341): WooCommerce\PayPalCommerce\SavePaymentMethods\SavePaymentMethodsModule->WooCommerce\PayPalCommerce\SavePaymentMethods\{closure}('') #11 /htdocs/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #12 /htdocs/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #13 /htdocs/wp-settings.php(720): do_action('after_setup_the...') #14 /htdocs/wp-config.php(98): require_once('/htdocs/wp-sett...') #15 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #16 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #17 /htdocs/index.php(17): require('/htdocs/wp-blog...') #18 {main} thrown in /htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-settings/services.php on line 105