i have a api from another wocommerce website and take some information with my product sku how can i add this information to post meta after created new product ? i wanna when i create a product , the information take with api and product sku and save to post meta.
i found this hook but i think this not working
<?PHP
function my_product_att( $sku ) {
// my api codes and take information and use
add_post_meta('product_id','key','value');
// i haven't problem here i just need Appropriate hook
}
add_action( 'save_post', 'my_product_att' ); // this hook not work for woocommerce