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

    (@anjitha21)

    Hi @antonic93 ,

    To remove these, you can use a filter that allows hiding specific meta data from the delivery note.

    Please add the following code to your site (in your theme’s functions.php file or via a custom plugin):

    add_filter( 'wcdn_product_meta_data', 'remove_unwanted_meta_from_invoice', 10, 2 );

    function remove_unwanted_meta_from_invoice( $meta, $item ) {

    if ( empty( $meta ) || ! is_array( $meta ) ) {
    return $meta;
    }

    foreach ( $meta as $key => $meta_item ) {

    $meta_key = isset( $meta_item['key'] ) ? $meta_item['key'] : '';

    if (
    $meta_key === 'wcb2bsa_item_commission' ||
    $meta_key === 'wcb2bsa_item_commission_amount_'
    ) {
    unset( $meta[$key] );
    }
    }

    return $meta;
    }

    This will remove those unwanted meta fields from the delivery note.

    Thread Starter antonic93

    (@antonic93)

    Hi, can I insert it via code snippet?

    Thread Starter antonic93

    (@antonic93)

    because I tested it and it doesn’t seem to change anything

    Plugin Support anjitha21

    (@anjitha21)

    Hi @antonic93 ,

    The filter you are currently using to remove the metadata from the product is correct. It should ideally prevent those extra fields from appearing on the delivery note. You can add it via Code snippet plugin also.

    Could you please let us know which plugin is being used to add this metadata to the product?

    If possible, do share the plugin details or name. We can install it on our end and check the behavior locally to guide you on how to remove those extra fields from the delivery note.

    Looking forward to your response.

    Thank you!

    Thread Starter antonic93

    (@antonic93)

    the plugin is WooCommerce B2B Sales Agents

    Plugin Support anjitha21

    (@anjitha21)

    Hi @antonic93 ,

    Thank you for sharing the plugin details — that’s really helpful!

    We’d also like to ask you to please update the plugin to the latest version (v7.1.1), as we recently released it with several bug fixes that may address this issue.

    Once updated, could you test again and let us know if the extra fields from WooCommerce B2B Sales Agents are still appearing on your delivery note?

    If the issue persists after updating, please do let us know and we’ll investigate further with the plugin details you’ve provided.

    Thank you for your patience!

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.