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 ?

  • 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... – bestprogrammerintheworld Oct 8 '15 at 12:07
  • Useless forum, unanswered tickets...That was the first thing i did as a customer. – John Priestakos Oct 9 '15 at 6:35
  • Ok. How is the themes post_type_options stored? – bestprogrammerintheworld Oct 9 '15 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. – John Priestakos Oct 9 '15 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... – bestprogrammerintheworld Oct 9 '15 at 12:00
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
    Issue is resolved by ThemeFuse support. – John Priestakos Oct 19 '15 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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