Hi, im having troubles trying to add a row in a repeater, It works fine if I click the complete button in the order list on woocommerce, but when I change the status in the order and click UPDATE it wont add the row, this is my code, any help will be much appreciated:
function mysite_woocommerce_order_status_completed( $order_id ) {
$row = array(
'order_file' => 198
);
add_row('order_files', $row, $order_id);
add_post_meta($order_id, '_test','hello');
}
add_action( 'woocommerce_order_status_completed', 'mysite_woocommerce_order_status_completed', 10, 1 )
P.D I added a add_post_meta() and it’s added in both scenarios.
on a UPDATE, I refreshed the DB after clicking UPDATE while saving, and I noticed that values are stored in DB but immediately removed, any Idea why is this happening? BTW I’m using the last version of PLUGIN PRO, WP & WC.