Created
January 16, 2017 17:33
-
-
Save guilhermealveslopes/d4828bc990f8dfd834610d6d558afcb9 to your computer and use it in GitHub Desktop.
Update MetaKey from FrontEnd Submission Form Wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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