Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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 '';
        }

    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.

    Hi,

    Thank you for your response. With the plugin enabled, all fees are removed every time the order status is changed to completed. Unfortunately, I can’t operate like that as fees make up a significant part of my application. Therefore, I removed the plugin and implemented my own solution.

    Best regards,
    Renier

    I have the same problem and noticed that, once the order is updated to ‘complete,’ the fees disappear, even for other payment methods that are not supposed to be affected by the plugin

    • This reply was modified 1 year, 2 months ago by reniersky.
    • This reply was modified 1 year, 2 months ago by reniersky.
Viewing 4 replies - 1 through 4 (of 4 total)