Paypal payment fatal error on WC_Order_Item_Room
-
Hi,
i’m using woocommerce-paypal-plugin as payment method with room booking reservations provided by this template: https://chalet.qodeinteractive.com/
after paypal transaction the site is stuck on checkout page and i get this error:
Uncaught TypeError: Argument 1 passed to WooCommerce\PayPalCommerce\ApiClient\Factory\ItemFactory::WooCommerce\PayPalCommerce\ApiClient\Factory\{closure}() must be an instance of WC_Order_Item_Product, instance of WC_Order_Item_Room given
so WC_Order_Item_Room is what my template deals with and generate (i guess)
do i need to cast WC_Order_Item_Room into WC_Order_Item_Product ? if so, how can i do it?
or is there any option to tell your plugin to accept different kind of products?
i hope i explained clearly!
thank you
here it is the full log info:
[22-Nov-2022 19:40:10 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to WooCommerce\PayPalCommerce\ApiClient\Factory\ItemFactory::WooCommerce\PayPalCommerce\ApiClient\Factory\{closure}() must be an instance of WC_Order_Item_Product, instance of WC_Order_Item_Room given in /web/htdocs/www.paolino848.it/home/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Factory/ItemFactory.php:98 Stack trace: #0 [internal function]: WooCommerce\PayPalCommerce\ApiClient\Factory\ItemFactory->WooCommerce\PayPalCommerce\ApiClient\Factory\{closure}() #1 /web/htdocs/www.paolino848.it/home/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Factory/ItemFactory.php(101): array_map() #2 /web/htdocs/www.paolino848.it/home/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Factory/AmountFactory.php(118): WooCommerce\PayPalCommerce\ApiClient\Factory\ItemFactory->from_wc_order() #3 /web/htdocs/www.paolino848.it/home/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Factor in /web/htdocs/www.paolino848.it/home/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Factory/ItemFactory.php on line 98
The page I need help with: [log in to see the link]
- The topic ‘Paypal payment fatal error on WC_Order_Item_Room’ is closed to new replies.