• Daniele

    (@dabesa)


    Hello guys,

    I built my first box, when I add the selected products to the checkout I get the message:

    Please wait a moment while we prepare your custom gift box!

    But admin-ajax is failing with error 500 and this PHP error is generated:

    Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, WC_Product_Attribute given in /var/www/html/site/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php:993
    Stack trace:
    #0 /var/www/html/site/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php(993): trim(Object(WC_Product_Attribute))
    #1 /var/www/html/site/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php(1148): WC_Cart->generate_cart_id(227452, 0, Array, Array)
    #2 /var/www/html/site/public_html/wp-content/plugins/doko-box-builder/public/class-hs-doko-public.php(524): WC_Cart->add_to_cart(227452, '1', 0, Array, Array)
    #3 /var/www/html/site/public_html/wp-includes/class-wp-hook.php(324): Hs_Doko_Public->add_to_cart('')
    #4 /var/www/html/site/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
    #5 /var/www/html/site/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #6 /var/www/html/site/public_html/wp-admin/admin-ajax.php(188): do_action('wp_ajax_doko_wc...')
    #7 {main}
      thrown

    Is this plugin still working on latest WC versions?

    Thanks
    Daniele

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Daniele

    (@dabesa)

    Dear support,

    It turn out that this happens when one of the products in out-of-stock.

    I think is a bug, it should not be possible for a customer to add out-of-stock products in the box.

    Thanks

    Plugin Author Homescriptone Solutions

    (@homescript)

    Hello @daniele,

    Thank you for highlighting and sharing details about this issue. We are currently working on a patch to address it. We will provide further updates in our support panel.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP error’ is closed to new replies.