// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped $badge // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ); } /** * Print standard education notice. * * @since 1.9.4 * * @param string $dismiss_section Dismiss section. */ private function print_standard_education( $dismiss_section ) { $notice = sprintf( wp_kses( /* translators: %1$s - link to the WPForms.com doc article. */ __( 'Easily perform calculations based on user input. Head over to the Advanced Tab to get started or read our documentation to learn more.', 'wpforms-lite' ), [ 'a' => [ 'href' => [], 'rel' => [], 'target' => [], ], ] ), esc_url( wpforms_utm_link( 'https://wpforms.com/docs/calculations-addon/', 'Calculations Education', 'Calculations Documentation' ) ) ); printf( '

%3$s

', esc_html__( 'Dismiss this notice.', 'wpforms-lite' ), esc_attr( $dismiss_section ), $notice // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ); } /** * Display advanced options. * * @since 1.8.4.1 * * @param array $field Field data. * @param object $instance Builder instance. * * @noinspection ReturnTypeCanBeDeclaredInspection * @noinspection PhpMissingParamTypeInspection */ public function advanced_options( $field, $instance ) { if ( ! in_array( $field['type'], self::ALLOWED_FIELD_TYPES, true ) ) { return; } $addon = $this->addons->get_addon( 'calculations' ); if ( ! $this->is_edu_required_by_status( $addon ) ) { return; } $row_args = $this->get_row_attributes( $addon ); $row_args['content'] = $instance->field_element( 'toggle', $field, $this->get_field_attributes( $addon ), false ); $instance->field_element( 'row', $field, $row_args ); } /** * Get row attributes. * * @since 1.8.4.1 * * @param array $addon Addon data. * * @return array */ private function get_row_attributes( array $addon ): array { $data = $this->prepare_field_action_data( $addon ); $default = [ 'slug' => 'calculation_is_enabled', ]; if ( ! empty( $data ) ) { return wp_parse_args( $data, $default ); } return wp_parse_args( [ 'data' => [ 'action' => 'upgrade', 'name' => esc_html__( 'Calculations', 'wpforms-lite' ), 'utm-content' => 'Enable Calculations', 'license' => $addon['license_level'], ], 'class' => 'education-modal', ], $default ); } /** * Get attributes for Enable Calculation field. * * @since 1.8.4.1 * * @param array $addon Addon data. * * @return array */ private function get_field_attributes( array $addon ): array { $default = [ 'slug' => 'calculation_is_enabled', 'value' => '0', 'desc' => esc_html__( 'Enable Calculation', 'wpforms-lite' ), ]; if ( $addon['plugin_allow'] ) { return $default; } return wp_parse_args( [ 'desc' => sprintf( '%1$s%2$s', esc_html__( 'Enable Calculation', 'wpforms-lite' ), Helpers::get_badge( $addon['license_level'], 'sm', 'inline', 'slate' ) ), 'attrs' => [ 'disabled' => 'disabled', ], ], $default ); } /** * Determine if we require displaying educational items according to the addon status. * * @since 1.8.4.1 * * @param array $addon Addon data. * * @return bool */ private function is_edu_required_by_status( array $addon ): bool { return ! ( empty( $addon ) || empty( $addon['action'] ) || empty( $addon['status'] ) || ( $addon['status'] === 'active' && $addon['action'] !== 'upgrade' ) ); } }
Fatal error: Uncaught Error: Class "PaymentPlugins\Blocks\Stripe\Payments\Gateways\BECSPayment" not found in /htdocs/book-stand.com/wp-content/plugins/woo-stripe-payment/packages/blocks/src/Payments/PaymentsApi.php:104 Stack trace: #0 /htdocs/book-stand.com/wp-content/plugins/woocommerce/src/Blocks/Registry/AbstractDependencyType.php(42): PaymentPlugins\Blocks\Stripe\Payments\PaymentsApi->PaymentPlugins\Blocks\Stripe\Payments\{closure}(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #1 /htdocs/book-stand.com/wp-content/plugins/woocommerce/src/Blocks/Registry/SharedType.php(28): Automattic\WooCommerce\Blocks\Registry\AbstractDependencyType->resolve_value(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #2 /htdocs/book-stand.com/wp-content/plugins/woocommerce/src/Blocks/Registry/Container.php(96): Automattic\WooCommerce\Blocks\Registry\SharedType->get(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #3 /htdocs/book-stand.com/wp-content/plugins/woo-stripe-payment/packages/blocks/src/Payments/PaymentsApi.php(235): Automattic\WooCommerce\Blocks\Registry\Container->get('PaymentPlugins\\...') #4 /htdocs/book-stand.com/wp-content/plugins/woo-stripe-payment/packages/blocks/src/Payments/PaymentsApi.php(226): PaymentPlugins\Blocks\Stripe\Payments\PaymentsApi->add_payment_method_to_registry('PaymentPlugins\\...', Object(Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry)) #5 /htdocs/book-stand.com/wp-includes/class-wp-hook.php(324): PaymentPlugins\Blocks\Stripe\Payments\PaymentsApi->register_payment_methods(Object(Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry)) #6 /htdocs/book-stand.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #7 /htdocs/book-stand.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #8 /htdocs/book-stand.com/wp-content/plugins/woocommerce/src/Blocks/Integrations/IntegrationRegistry.php(50): do_action('woocommerce_blo...', Object(Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry)) #9 /htdocs/book-stand.com/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\Integrations\IntegrationRegistry->initialize('') #10 /htdocs/book-stand.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #11 /htdocs/book-stand.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #12 /htdocs/book-stand.com/wp-settings.php(704): do_action('init') #13 /htdocs/book-stand.com/wp-config.php(98): require_once('/htdocs/book-st...') #14 /htdocs/book-stand.com/wp-load.php(50): require_once('/htdocs/book-st...') #15 /htdocs/book-stand.com/wp-blog-header.php(13): require_once('/htdocs/book-st...') #16 /htdocs/book-stand.com/index.php(17): require('/htdocs/book-st...') #17 {main} thrown in /htdocs/book-stand.com/wp-content/plugins/woo-stripe-payment/packages/blocks/src/Payments/PaymentsApi.php on line 104