hook woocommerce_product_import_inserted_product_object action not working
-
Hi,
I have tried to use the hook filter
woocommerce_product_import_pre_insert_product_object
in my theme functions.php
but it is not working (not triggering)
then I have tried to use the action
woocommerce_product_import_inserted_product_object
and the same issue herecode example
function i_process_woo_import( $product, $data ) { /*echo 'test'; exit;*/ $product_id = $product->get_id(); if( isset( $data[ 'variation_product_url' ] ) && ! empty( $data[ 'variation_product_url' ] ) ) { update_post_meta( $product_id, 'variation_product_url', htmlspecialchars_decode( $data[ 'variation_product_url' ] ) ); } } add_action( 'woocommerce_product_import_inserted_product_object', 'i_process_woo_import', 10, 2 );
- The topic ‘hook woocommerce_product_import_inserted_product_object action not working’ is closed to new replies.