• Resolved web4studio2019

    (@web4studio2019)


    Hi

    Since a few days we get double lines with weight information at our invoices + delivery notes.

    Any idea how to solve this? Maybe i need to edit the default simple/template?

    Like: 1 x = Characteristics + 1 x = options/variants

    Salted Caramel Fudge, vegan (Lieferzeit: DE: 4-12 Tage | AT,BE,CH,ES: 5-17 Tage)
    Art.-Nr.: F013v
    Gewicht: 100g
    Gewicht: 100g

    Many thx…

    Nadine

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor dwpriv

    (@dwpriv)

    Give this code snippet a try

    /**
    * Hide weight
    */
    add_action( 'wpo_wcpdf_custom_styles', function( $document_type, $document ) {
    if ( $order = $document->order ) {
    ?>
    .weight:first-child {
    display: none;
    }
    <?php
    }
    }, 10 , 2 );

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use code snippets

    Thread Starter web4studio2019

    (@web4studio2019)

    Hey there

    Unfortunately still the same. May i have a wrong function.php?

    See below:

    <?php
    /**

    /**

    • Define Constants
      */
      define( ‘CHILD_THEME_ASTRA_CHILD_VERSION’, ‘1.0.0’ );

    /**

    • Enqueue styles
      */
      function child_enqueue_styles() { wp_enqueue_style( ‘astra-child-theme-css’, get_stylesheet_directory_uri() . ‘/style.css’, array(‘astra-theme-css’), CHILD_THEME_ASTRA_CHILD_VERSION, ‘all’ );

    }

    add_action( ‘wpo_wcpdf_custom_styles’, function( $document_type, $document ) {
    if ( $order = $document->order ) {
    ?>
    .weight:first-child {
    display: none;
    }
    <?php
    }
    }, 10 , 2 );

    add_action( ‘wp_enqueue_scripts’, ‘child_enqueue_styles’, 15 );

    add_filter( ‘wc_add_to_cart_message_html’, ‘my_custom_add_to_cart_message’ );
    function my_custom_add_to_cart_message( $message ) {
    $message .= sprintf( ‘%s‘, get_permalink( woocommerce_get_page_id( ‘shop’ ) ), ‘Weiter Shoppen’);
    return $message;
    }

    add_shortcode( ‘ekaa_back_btn’ , ‘ekaaBackButton’);

    function ekaaBackButton(){
    if ( wp_get_referer() ) {
    $button = “\n zurück”;
    echo ( $button );
    }
    }

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @web4studio2019,

    Could you please tell us which PDF template are you using?

    You can check this in WooCommerce?? PDF?Invoices?? General?tab?? Choose a template.

    Thread Starter web4studio2019

    (@web4studio2019)

    They use the SIMPLE template + Astra Child Theme.

    Many thx… Nadine

    Plugin Contributor Yordan Soares

    (@yordansoares)

    If you are using the default “Simple” template, maybe a third party is adding the weight againg in the PDF document.

    That said, and just to rule out that this data is not being added twice directly in the order data, could you please go to the details of an order with this issue, and check if the weight is displayed twice there, too?

    Thread Starter web4studio2019

    (@web4studio2019)

    Dear Yordan.

    That’s right, your guess was correct. The line is only included once in the order. A third party plugin may cause this issue… I guess it might be the german market plugin, what do you think about it?

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @web4studio2019,

    I’m not sure what could be happening, but what you said could be possible. My recommendation is to contact the developers of the plugin you have mentioned to ask them if they are aware of this issue.

    If they do not fix the issue, please contact us at [email protected], so we can investigate further.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.