Hook for external use
-
Hello, I am working on an integration of your system with external plugins, specifically “easy appointments” to create appointments with zoom meetings and edit them from the frontend, for which I use WPUF.
My problem is that when I edit a meeting post from the frontend, I need to call the zoom data update routine in your plugin, for which I do this:
add_action( 'wpuf_add_post_after_insert', 'update_zoom_post' , 10,4); add_action( 'wpuf_edit_post_after_update', 'update_zoom_post' , 10,4); function update_zoom_post( $post_id , $form_id, $form_setting, $form_vars ) { if(get_post_type($post_id)=="zoom-meetings"){ $zz = new Zoom_Video_Conferencing_Admin_PostType(); $zz->save_metabox($post_id,get_post($post_id),true); } }As your save_metabox method checks a form nonce, I had to modify your code by adding a parameter to prevent it from checking the nonce, modifying your code, which is not orthodox, sorry. Everything works fine except for this problem I can’t solve.
I wanted to ask you if you could separate the save_metabox function into two functions, so that one would control the nonce and permissions but the update action of zoom API would be performed from another function that I could call directly from my code. Or any equivalent solution would be welcome.
Thank you very much and best regards
The topic ‘Hook for external use’ is closed to new replies.