-
-
Save alexmangini/ac8dd27c13b0287df0e270d524b269a2 to your computer and use it in GitHub Desktop.
The PHP file that's called as $ajax_url in the star-rating.js file
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
<?php | |
function my_function_name() { | |
$postid = $_POST['postid']; | |
$rating = $_POST['rating']; | |
update_post_meta( $postid, 'delivery_rating', $rating ); | |
wp_die(); | |
} | |
add_action( 'wp_ajax_my_function_name', 'my_function_name' ); | |
add_action( 'wp_ajax_nopriv_my_function_name', 'my_function_name' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment