0

I want to access metabox data in save_post filter of wordpress . but I cant access to these meta data because the metabox data writed in post_meta table after post publish...

I also use metabox.io plugin and I can access to data in save_post filter.

how can I solve my problem?

1 Answers1

0

I solved my problem with set high priority to add_action or add_filter of save_post hook The cmb2 use add_action with 10 priority... You only need use higher than 10.

    add_action( 'save_post', 'custom_function_on_save', 11 );

Hooks a function on to a specific action.