Well I have a solution, albeit not very elegant.
using this hook to grab and print the error
PHP Code:
add_action('admin_head-post.php', 'add_eshop_notice'); // called after the redirect
user transient option to store the error if and when required
PHP Code:
if($stkav!='0' && ($eshop_product['sku']=='' || $eshop_product['description']=='' || $eshop_product['product']['1']['option']=='' || $eshop_product['product']['1']['price']=='')){
update_post_meta( $id, '_eshop_stock', '0');
set_transient('eshoperr', 'error text will go here');
}
which when used will add the admin notice
PHP Code:
function add_eshop_notice(){
$err=get_transient('eshoperr');
if($err!=''){
add_action('admin_notices','eshop_error_message');
}
}
using this function to then print it.
PHP Code:
function eshop_error_message(){ ?>
<div class="error fade"><?php echo get_transient('eshoperr'); ?></div>
<?php
delete_transient('eshoperr');
}
Probably the long way around of doing things, but it does work