Created
June 13, 2018 00:44
-
-
Save Redolance/1f840bf58ba25cd7645ae2b5f8b062a0 to your computer and use it in GitHub Desktop.
Create custom filed , or just update it if its already exist .
This file contains hidden or 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
$deal_id = $_POST['deal_id']; | |
if ( get_post_meta($deal_id, 'redo_expired_votes', true) ){ | |
$ex_votes = get_post_meta($deal_id, 'redo_expired_votes', true); | |
$ex_vote = $ex_votes + 1; | |
update_post_meta($deal_id,'redo_expired_votes', $ex_vote); | |
}else{ | |
add_post_meta($deal_id, 'redo_expired_votes', '1', true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment