• Resolved ZweiGrafiker

    (@zweigrafiker)


    Hi there, we just noticed this bad behaviour on our customers’ site. The pdf invoicing leads to a critical error in wordpress.

    wordpress version 6.2.2
    php version 8.0
    woocommerce version 7.8.1
    booster for woocommerce version 6.0.6

    Whenever we try to display an invoice pdf – from dashboard or frontend – there is this error.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support David G

    (@gravid7)

    Hi @zweigrafiker

    Thanks for reaching out to us.

    If possible can you please share screenshots of your configuration settings and screenshots of your issue? So, we can check and help you.

    Plugin Support David G

    (@gravid7)

    Hi @zweigrafiker

    I haven’t heard back from you, so I believe the issue has been resolved.
    I’m marking this topic complete, please feel free to open a new thread for any further queries.

    Hello,
    I have exactly the same issue now for almost 2 months. I can’t figure out what it is.

    The pdf invoicing leads to a critical error in wordpress. Whenever i try to display an invoice pdf – from dashboard or frontend – there is this error.

    This also happens when a customer tried to download their invoice in their account.

    And also when turn the status of an order to completed: the same error.

    I have made a video of the issue and send two text files of Booster settings and WordPress/woocommerce status rapport of the website https://www.regenesis-magnesium.nl

    https://we.tl/t-GfBTx3Dvxp

    My client’s website is having this exact issue now as well. I tried turning on debug mode but I still can’t get a more specific error. Everything is updated, and I increased the memory limit in wp_config. I emptied the cache, I tried the Simple version of the invoice instead of the custom, I tried the Test vs the non-test, I tried HTML invoices instead of PDF, and I tried a downloadable PDF instead of in a new browser window, all to no avail.

    The error is related to the shortcode: product_sale_price_multiply_qty
    Products without a discounted price give the error and products with a discounted price work just fine.
    Can a php conditional statement be used in the template to show the working shortcode?

    ERROR WHEN NO SPECIAL PRICE:

    [wcj_order_items_table table_class=”pdf_invoice_items_table”

    columns="item_number|item_name|item_quantity|product_regular_price_multiply_qty|product_sale_price_multiply_qty|line_subtotal_tax_incl"
    
    columns_titles="|Product|Qty|Price|Discounted|Total"
    
    columns_styles="width:7%;|width:43%;|width:5%;|width:15%;text-align:center;|width:15%;text-align:center;|width:15%;text-align:right;"]

    NO ERROR ON DISCOUNT

    [wcj_order_items_table table_class=”pdf_invoice_items_table”

    columns="item_number|item_name|item_quantity|product_regular_price_multiply_qty||line_subtotal_tax_incl"
    
    columns_titles="|Product|Qty|Price|Discounted|Total"
    
    columns_styles="width:7%;|width:43%;|width:5%;|width:15%;text-align:center;|width:15%;text-align:center;|width:15%;text-align:right;"]
    • This reply was modified 1 year, 1 month ago by reniersky.

    By editing the plugin as follows the error is resolved:
    This is obviously a problem as updates will override the problem again, but i could not manage to override the file from my child theme, or create a filter to work…
    plugins/woocommerce-jetpack/includes/shortcodes/class-wcj-order-items-shortcodes.php
    Line 564

    Comment:
    //return ( is_object( $the_product ) ) ? $this->wcj_price_shortcode( $the_product->get_sale_price() * $item['qty'], $atts ) : '';
    
    And Added:
    if (is_object($the_product) && is_numeric($the_product->get_sale_price())) {
            $sale_price = $the_product->get_sale_price();
            $result = $sale_price * $item['qty'];
            return $this->wcj_price_shortcode($result, $atts);
        } else {
            return '';
        }
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PDF Invoice > ctritical error’ is closed to new replies.