function process_order_meta_box_actions($post) { $order_id = $post->id; $post_status = $post->post_status; if ($post_status == 'trash' || $post_status == 'wc-cancelled') { return false; } parent::emitirNFe(array($order_id)); }