Skip to content

Instantly share code, notes, and snippets.

@guilhermealveslopes
Created January 16, 2017 17:33
Show Gist options
  • Save guilhermealveslopes/d4828bc990f8dfd834610d6d558afcb9 to your computer and use it in GitHub Desktop.
Save guilhermealveslopes/d4828bc990f8dfd834610d6d558afcb9 to your computer and use it in GitHub Desktop.
Update MetaKey from FrontEnd Submission Form Wordpress
function wpufe_update_post_price( $post_id ) {
$price = get_post_meta( $post_id, '_price', true );
update_post_meta( $post_id, '_regular_price', $price );
}
add_action( 'wpuf_add_post_after_insert', 'wpufe_update_post_price' );
add_action( 'wpuf_edit_post_after_update', 'wpufe_update_post_price' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment