Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Bas Elbers

    (@baaaaas)

    add_filter( 'woocommerce_hidden_order_itemmeta', 'add_hidden_order_items' );
    function add_hidden_order_items( $order_items ) {
        $order_items[] = '_subscription_interval';
        $order_items[] = '_subscription_length';
        // end so on...
        return $order_items;
    }

    I’ve already made a filter. Please add the code above to your functions.php of your theme.

    Thread Starter s2ontwerp

    (@s2ontwerp)

    I already figured it out thanks to some helpful posts at Stack Overflow, but I kinda forgot about sharing my solution in all the rush. Your snippet will come in handy for someone to stumble upon this page.
    Thanks on behalf of the community Bas!

    Cheers!

    Johan Oldenburg
    Superscherp Ontwerp

    http://www.s2ontwerp.nl
    http://www.s2mobile.nl

    Plugin Author Bas Elbers

    (@baaaaas)

    That’s great Johan!
    If you have some feature requests, please let me know.
    Also I would like you to ask to rate the plugin. It will support future development.

    Hi, i’m trying to remove non human readable lines from invoice but i am not sure where or how to do that,
    i want to remove those line from the pdf:

    _subscription_period: week
    _subscription_interval: 1
    _subscription_length: 1
    _subscription_trial_period: day
    _subscription_recurring_amount: 1099
    _subscription_sign_up_fee:
    _recurring_line_total: 955.6522
    _recurring_line_tax: 143.3478
    _recurring_line_subtotal: 955.6522
    _recurring_line_subtotal_tax: 143.3478
    _subscription_start_date: 2015-08-27
    07:20:56
    _subscription_expiry_date: 2015-09-03
    07:20:56
    _subscription_trial_expiry_date:
    _subscription_failed_payments:
    _subscription_status: active
    _subscription_end_date:
    _subscription_suspension_count:

    How can i do that

    Thread Starter s2ontwerp

    (@s2ontwerp)

    Hi richardfv,

    You can do that by adding the following codeblock to functions.php

    add_filter( 'woocommerce_hidden_order_itemmeta', 'add_hidden_order_items' );
    function add_hidden_order_items( $order_items ) {
        $order_items[] = '_subscription_period';
        $order_items[] = '_subscription_interval';
        $order_items[] = '_subscription_length';
        // [ add the remaining order items here... ]
        return $order_items;
    }

    Greetings,

    Johan Oldenburg
    Superscherp Ontwerp

    Plugin Author Bas Elbers

    (@baaaaas)

    Johan,
    Thanks for the support! 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hide order item meta’ is closed to new replies.