] ) || apply_filters( 'wc_ppcp_checkout_scripts', false ) ) { $handles = $this->payment_method_registry->add_checkout_script_dependencies(); $handles = array_merge( $handles, $this->payment_method_registry->add_express_checkout_script_dependencies() ); if ( $this->payment_method_registry->get_active_integrations() ) { $this->assets->enqueue_style( 'wc-ppcp-style', 'build/css/styles.css' ); } } elseif ( $this->context_handler->is_cart() ) { $this->payment_method_registry->initialize(); $handles = $this->payment_method_registry->add_cart_script_dependencies(); } elseif ( $this->context_handler->is_product() ) { $this->payment_method_registry->initialize(); $handles = $this->payment_method_registry->add_product_script_dependencies(); } elseif ( $this->context_handler->is_shop() ) { $handles = $this->payment_method_registry->add_shop_script_dependencies(); } $this->add_scripts( $handles ); } /** * Adds all required scripts and data that are required for payment buttons to function * on a product page. * * @throws \Exception */ public function add_product_scripts() { $handles = $this->payment_method_registry->add_product_script_dependencies(); $this->add_scripts( $handles ); } public function add_scripts( $handles ) { if ( ! is_admin() && ( $handles = apply_filters( 'wc_ppcp_script_dependencies', $handles, $this->assets, $this->context_handler, $this ) ) ) { // enqueue required script here if ( wp_script_is( 'wc-ppcp-frontend-commons' ) ) { foreach ( $handles as $handle ) { wp_enqueue_script( $handle ); } } else { $this->assets->enqueue_script( 'wc-ppcp-frontend-commons', 'build/js/frontend-commons.js', $handles ); $this->assets->enqueue_style( 'wc-ppcp-style', 'build/css/styles.css' ); $this->asset_data->add( 'generalData', $this->get_general_asset_data() ); $this->asset_data->add( 'errorMessages', Main::container()->get( Messages::class )->get_messages() ); $this->asset_data->add( 'i18n', [ 'locale' => wp_json_encode( WC()->countries->get_country_locale() ), 'locale_fields' => wp_json_encode( WC()->countries->get_country_locale_field_selectors() ) ] ); $this->payment_method_registry->add_payment_method_data( $this->asset_data, $this->context_handler ); } } } private function get_general_asset_data() { return apply_filters( 'wc_ppcp_general_asset_data', [ 'clientId' => $this->api_settings->get_client_id(), 'environment' => $this->api_settings->get_environment(), 'partner_id' => Constants::PARTNER_ID, 'page' => $this->context_handler->get_context(), 'version' => Main::container()->get( Config::class )->version() ] ); } public function get_payment_method_registry() { return $this->payment_method_registry; } /** * @param \WC_Payment_Gateway[] $gateways * * @return mixed */ public function get_available_payment_gateways( $gateways ) { if ( $this->context_handler && $this->context_handler->is_add_payment_method() ) { unset( $gateways['ppcp'] ); } return $gateways; } public function add_minicart_scripts() { if ( $this->context_handler ) { if ( ! $this->context_handler->is_checkout() && ! $this->context_handler->is_cart() && ! $this->context_handler->is_order_pay() && ! $this->context_handler->is_order_received() ) { $handles = $this->payment_method_registry->add_minicart_script_dependencies(); if ( wp_script_is( 'wc-ppcp-frontend-commons' ) ) { foreach ( $handles as $handle ) { wp_enqueue_script( $handle ); } } else { $this->add_scripts( $handles ); } } } } /** * @return \PaymentPlugins\WooCommerce\PPCP\Admin\Settings\APISettings */ public function get_api_settings() { return $this->api_settings; } }
Fatal error: Uncaught Error: Class "PaymentPlugins\WooCommerce\PPCP\Payments\PaymentGateways" not found in /htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/Main.php:141 Stack trace: #0 /htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/Container/AbstractResolver.php(18): PaymentPlugins\WooCommerce\PPCP\Main->PaymentPlugins\WooCommerce\PPCP\{closure}(Object(PaymentPlugins\WooCommerce\PPCP\Container\Container)) #1 /htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/Container/BaseResolver.php(13): PaymentPlugins\WooCommerce\PPCP\Container\AbstractResolver->resolve(Object(PaymentPlugins\WooCommerce\PPCP\Container\Container)) #2 /htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/Container/Container.php(25): PaymentPlugins\WooCommerce\PPCP\Container\BaseResolver->get(Object(PaymentPlugins\WooCommerce\PPCP\Container\Container)) #3 /htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/Main.php(86): PaymentPlugins\WooCommerce\PPCP\Container\Container->get('PaymentPlugins\\...') #4 /htdocs/wp-includes/class-wp-hook.php(324): PaymentPlugins\WooCommerce\PPCP\Main->initialize('') #5 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #6 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #7 /htdocs/wp-content/plugins/woocommerce/includes/class-woocommerce.php(860): do_action('woocommerce_ini...') #8 /htdocs/wp-includes/class-wp-hook.php(324): WooCommerce->init('') #9 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #10 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #11 /htdocs/wp-settings.php(704): do_action('init') #12 /htdocs/wp-config.php(82): require_once('/htdocs/wp-sett...') #13 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #14 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #15 /htdocs/index.php(17): require('/htdocs/wp-blog...') #16 {main} thrown in /htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/Main.php on line 141