• Resolved speradev

    (@speradev)


    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]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @speradev

    Thank you for reaching out to us, we are here to help.
    We have seen this error one time before and have been looking into this, but so far without much success. We would like to get more details from you to check if we can reproduce this issue.
    Do you know what plugin is creating the WC_Order_Item_Room? If you want, please open a private engagement with us, so you can easily share the system report and logs with us. You can find the instruction for this here: https://paypal.inpsyde.com/docs/request-support/
    (please add the URL of this thread in the ticket as well)

    Kind regards,
    Joost

    Plugin Support Syde Joost

    (@joostvandevijver)

    Since we haven’t heard back from you, I’m going to mark it as resolved.
    In case you’re still having problems, feel free to let us know!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Paypal payment fatal error on WC_Order_Item_Room’ is closed to new replies.