Is there a reason when using the add_meta_box()
callback, that when I do global $post
I can't seem to access anything, or get the ID. I'm in WooCommerce, do I need to use global $product
instead... if so why?
When I do add_meta_box( 'supplier_package_box', __( 'Supplier', 'supplier' ), 'populate_meta_box' );
In my callback:
function populate_meta_box(){
global $post
print_r($post);
echo '</br>';
$post
is always empty... for context I want to check if a post meta exists so I can populate an input box if necessary. :)