How to hide costs from orders items after deactivating the plugin?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #89371
    Paul
    Guest

    Hello, when deactivating the plugin, the costs of the products appear in the orders below the SKU, with the code: _alg_wc_cog_item_cost: 0.50.
    I do not want the costs to be seen in the order

    #89372
    Tom Anbinder
    Moderator
    Plugin Support

    Hi Paul,

    To hide it you will need to add this snippet to your (child) theme’s functions.php file:

    add_filter( 'woocommerce_hidden_order_itemmeta', 'my_alg_wc_cog_hide_order_cost_meta', PHP_INT_MAX );
    if ( ! function_exists( 'my_alg_wc_cog_hide_order_cost_meta' ) ) {
        function my_alg_wc_cog_hide_order_cost_meta( $meta_keys ) {
            $meta_keys[] = '_alg_wc_cog_item_cost';
            return $meta_keys;
        }
    }

    Hope that helps. Please let me know if you have any questions.

    #89373
    plaguna22
    Participant

    I do not know how to do it, could you help me please

    #89374
    Tom Anbinder
    Moderator
    Plugin Support

    Hi Paul,

    Sure. I would need to log in to your site though (my email is [email protected]).

    #89375
    plaguna22
    Participant

    Thank you, I sent you an email. I deactivate the plugin momentarily because I don’t want the other managers of my store to see the costs and reports. By some way to hide it for the users “store managers” and only the “administrator” can see it.

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