From d0d442609232fd4e01ea10dc19a7ca608c09a35d Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Mon, 28 Dec 2015 15:51:15 -0500 Subject: [PATCH] fixed syntax error in updating the post meta fields --- index.php | 8 ++++---- views/product_detail.php | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 59a82bc..2bddd44 100644 --- a/index.php +++ b/index.php @@ -122,7 +122,7 @@ function miproduct_features() global $post; // Noncename needed to verify where the data originated - $nonce = wp_create_nonce( 'miproductmeta-meta-noncename' ); + $nonce = wp_create_nonce( 'miproductmeta-meta-noncename' ); echo ''; // get the features for the post $features = get_post_meta( $post->ID, 'miproduct_features', true ); @@ -151,8 +151,8 @@ function miproduct_related_products() global $post; // Noncename needed to verify where the data originated - //echo ''; + echo ''; // get the features for the post $related_products = get_post_meta( $post->ID, 'miproduct_related_products', true ); // output field @@ -185,7 +185,7 @@ function miproduct_save_meta() return $post->ID; } $features = filter_var( $_POST['miproduct_features'] ); - $related_products = filter_var( $_POST['miproduct_features'] ); + $related_products = filter_var( $_POST['miproduct_related_products'] ); update_post_meta( $post->ID, 'miproduct_features', $features ); update_post_meta( $post->ID, 'miproduct_related_products', $related_products ); diff --git a/views/product_detail.php b/views/product_detail.php index 22ad52b..d401563 100644 --- a/views/product_detail.php +++ b/views/product_detail.php @@ -28,5 +28,7 @@ foreach ($tags as $tag){ ?> ID); + ?> -- 2.17.1