Okay
  Public Ticket #2245547
How do I hide "Repeat Offset"?
Closed

Comments

  •  1
    Patrick started the conversation

    Hi there,
    on the confirmation site there is an information for the client I want to hide: "Repeat Offset: 0" (see attachment).
    How can I do this?
    Thanks and best regards, Patrick

  •  877
    Zhivko replied

    Hi,

    Go to your theme functions.php file and at the bottom add following filter:

    add_filter('woocommerce_order_item_get_formatted_meta_data', function($meta, $instance) {
        if (false === ($instance instanceof \WC_Order_Item_Product)) {
            return $meta;
        }     if ('1' !== get_post_meta($instance->get_product_id(), 'stec_bookable', true)) {
            return $meta;
        }     $filtered_meta = array();     if (is_array($meta)) {         $skip = array('Repeat Offset');         foreach ($meta as $var) {
           
                if (in_array($var->display_key, $skip)) {
                    continue;
                }             $filtered_meta[]  = $var;
            }
        }     return $filtered_meta;
    }, 11, 3);


    In the next version we'll remove this variable by default so you can remove the filter after the update.


    Stachethemes Developer