* The shipping rate. * * @var \WC_Shipping_Rate $rate */ $shipping_packages[] = array('id' => $rate->get_id(), 'label' => $rate->get_label(), 'cost' => (float) $rate_cost, 'cost_str' => (new Money((float) $rate_cost, $currency_code))->value_str(), 'description' => html_entity_decode(wp_strip_all_tags(wc_price((float) $rate->get_cost(), array('currency' => get_woocommerce_currency()))), \ENT_QUOTES, 'UTF-8')); } $response['chosen_shipping_methods'] = WC()->session->get('chosen_shipping_methods'); $response['shipping_packages'] = $shipping_packages; return $response; } }
Fatal error: Uncaught Error: Class "WooCommerce\PayPalCommerce\Button\Endpoint\CartScriptParamsEndpoint" not found in /htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/ButtonModule.php:160 Stack trace: #0 /htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/ButtonModule.php(85): WooCommerce\PayPalCommerce\Button\ButtonModule->register_ajax_endpoints(Object(WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer)) #1 /htdocs/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Inpsyde/Modularity/Package.php(431): WooCommerce\PayPalCommerce\Button\ButtonModule->run(Object(WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer)) #2 /htdocs/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Inpsyde/Modularity/Package.php(306): WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Package->doExecute() #3 /htdocs/wp-content/plugins/woocommerce-paypal-payments/bootstrap.php(32): WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Package->boot() #4 /htdocs/wp-content/plugins/woocommerce-paypal-payments/woocommerce-paypal-payments.php(93): WooCommerce\PayPalCommerce\{closure}('/htdocs/wp-cont...') #5 /htdocs/wp-content/plugins/woocommerce-paypal-payments/woocommerce-paypal-payments.php(103): WooCommerce\PayPalCommerce\init() #6 /htdocs/wp-includes/class-wp-hook.php(324): WooCommerce\PayPalCommerce\{closure}('') #7 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #8 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #9 /htdocs/wp-settings.php(578): do_action('plugins_loaded') #10 /htdocs/wp-config.php(91): require_once('/htdocs/wp-sett...') #11 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #12 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #13 /htdocs/index.php(17): require('/htdocs/wp-blog...') #14 {main} Next Exception: Can't obtain the container instance at this point of application. in /htdocs/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Inpsyde/Modularity/Package.php:627 Stack trace: #0 /htdocs/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Inpsyde/Modularity/Package.php(520): WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Package->assertStatus(4, 'obtain the cont...', '>=') #1 /htdocs/wp-content/plugins/woocommerce-paypal-payments/bootstrap.php(33): WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Package->container() #2 /htdocs/wp-content/plugins/woocommerce-paypal-payments/woocommerce-paypal-payments.php(93): WooCommerce\PayPalCommerce\{closure}('/htdocs/wp-cont...') #3 /htdocs/wp-content/plugins/woocommerce-paypal-payments/woocommerce-paypal-payments.php(103): WooCommerce\PayPalCommerce\init() #4 /htdocs/wp-includes/class-wp-hook.php(324): WooCommerce\PayPalCommerce\{closure}('') #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-settings.php(578): do_action('plugins_loaded') #8 /htdocs/wp-config.php(91): require_once('/htdocs/wp-sett...') #9 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #10 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #11 /htdocs/index.php(17): require('/htdocs/wp-blog...') #12 {main} thrown in /htdocs/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Inpsyde/Modularity/Package.php on line 627