使用wp_nonce_url和admin_url函数时不加载字符串

I am trying to modify an existing plugin and one of the modifications that I am trying to do is to correct the way buttons are displayed on a certain page. Currently it's like this http://cl.ly/image/1C1l1H3w0r22 (excuse me for pasting screenshot link, I couldn't paste it on here). I am trying to change it to this http://cl.ly/image/3F2e252y3c41.

The buttons are loaded, that is working. The action is taking place, that is working. The images are loading, that is working. But for some strange reason the $post->ID is not being loaded.

I am getting wp-admin/?print_pip=true&post&type=print_invoice&_wpnonce=e25508b9df when I should be getting wp-admin/?print_pip=true&post=2712&type=print_invoice&_wpnonce=e25508b9df. 2712 being the order number in this case.

I understand that the problem is this: -

wp_nonce_url(admin_url('?print_pip=true&post='.$post->ID.'&type=print_invoice'), 'print-pip');

Would be great if someone can help me figure out what I am doing wrong.

Fixed this problem. I wasn't getting the $post so fixed it by changing top lines with: -

function pip_woocommerce_alter_action_column($order){
global $post;
$order = new WC_Order( $post->ID );