0

Im using a theme for vehicle listings and the WPUF Pro plugin for frontend submitting.

WPUF plugin automatically reads the taxonomies of themes post_type (vehicle), but the theme got vehicle (details) options, that plugin cannot handle on save.

I tried to use the hook that weDevs provide in documentation, but no success (and no respond on tickets too).

On Screen Options I can enable the WPUF Custom Field and see the options that I submit on form, but i want to save them as vehicle options (same as I submit a vehicle as admin through dashboard).

theme/function.php

function wpuf_update_vehicle_year( $post_id ) {
    $year = get_post_meta( $post_id, 'seek_property_year', true );

    update_post_meta( $post_id, 'seek_property_year', $year );
}

add_action( 'wpuf_add_post_after_insert', 'wpuf_update_vehicle_year' );

Any suggestion on how i can pass the custom fields of WPUF to themes post_type options ?

8
  • 1
    If you are trying to use a function that weDev supply you with and that does not work, I would contact them because you do pay for a service... Commented Oct 8, 2015 at 12:07
  • Useless forum, unanswered tickets...That was the first thing i did as a customer. Commented Oct 9, 2015 at 6:35
  • Ok. How is the themes post_type_options stored? Commented Oct 9, 2015 at 6:55
  • According to ThemeFuse,there is triggered the save_post action, and the framework seek extension is attached to that action, it selects automatically the options and syncs them with the aditional database table used by seek extensions to store the vehicle options for search. Commented Oct 9, 2015 at 8:45
  • I don't know what code you've written, but one major thing is that it doesn't rely on global $post... look here for more info... wedevs.com/support/topic/… hope it helps... Commented Oct 9, 2015 at 12:00

1 Answer 1

0

Your code...

function wpuf_update_vehicle_year( $post_id ) {
    $year = get_post_meta( $post_id, 'seek_property_year', true );

    update_post_meta( $post_id, 'seek_property_year', $year );
}

add_action( 'wpuf_add_post_after_insert', 'wpuf_update_vehicle_year' );

is probably executed, but nothing will change anyway because the thing it does is to grab meta data (with get_post_meta) for seek_property_year and then update the same meta data with the same value:

  1. Get value for $post_id for seek_property_year. Lets say the value is 2010
  2. Put value for $post_id for seek_property_year. Put 2010 into seek_property_year
  3. ...will result in no changes in database (nothing seems to happen)
1
  • 1
    Issue is resolved by ThemeFuse support. Commented Oct 19, 2015 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.