Home Forums Plugin Support WP User Frontend Pro $_GET[ ] with wpuf_add_post_after_insert

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Tareq Hasan 5 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #13144

    Post count: 28


    function is not not working / meta field is created but there is no value

    function meta_event( $post_id ) {
    			if ( isset( $_GET['event_id'] ) ) {
    		        update_post_meta($post_id, 'event', $_GET['event_id'] );
    add_action( 'wpuf_add_post_after_insert', 'meta_event' );

    Tareq Hasan
    Post count: 2831

    You can't access the $_GET variable in that action hook. It's running via ajax and no $_GET variables are passing there. You could insert the event id as hidden field in the form and then you can access it with that action hook.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘$_GET[ ] with wpuf_add_post_after_insert’ is closed to new replies.