I’m trying to add some meta fields to a WPSC product using the following code:
/**
* data callback
*/
function abc_callback($object, $box)
{
echo 'callback executed!';
}
/**
* add custom fields
*/
function abc_load_post($post_id)
{
add_meta_box('abc_post_id', 'abc', 'abc_callback', 'post', 'normal', 'default', array());
}
add_action('load-post.php', 'abc_load_post', 10, 2);
add_action('load-post-new.php', 'abc_load_post', 10, 2);
The abc_load_post
function gets called fine but nothing actually appears on the product editing page (i.e. /wp-admin/post.php
)
Can someone explain what I’m doing wrong?