It can be done but I don’t know how to do it out of the top of my head.
Basically you’ll want to add and action here: https://core.trac.ww.wp.xz.cn/browser/tags/3.9.1/src/wp-includes/meta.php#L248
updated_{$meta_type}_meta
Then check to see if the meta_key is the WCK meta_key.
If it is, read the meta value or the meta key, and do something like this for a single metabox:
$meta_suffix = 1;
if( !empty( $single_values ) ){
foreach( $single_values as $name => $value ){
update_post_meta( $post_ID, $meta_name.'_'.$name.'_'.$meta_suffix, $value );
}
}
If it’s a repeater, then you’ll need to make changes to the above to take into account the multiple array.
Please note I haven’t tested any of this. But logically speaking it should work.
Thread Starter
WWDP
(@wwdp)
Hi,
Sorry for my late response. A little busy these days…..
Thanks for your solution. After some tweaking it works great!