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

Forums Cost of Goods for WooCommerce How to hide costs from orders items after deactivating the plugin?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.