From 43e29c184bf2fa1ea28a4c32aa86e5b4cbc16e66 Mon Sep 17 00:00:00 2001 From: jaswsinc Date: Sat, 7 Mar 2015 11:40:17 -0900 Subject: [PATCH] Bug fix in Specific Post/Page Access for Gift/Redemption Codes. - See: https://github.com/websharks/s2member/issues/512 --- s2member-pro/includes/classes/sc-gift-codes-in.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s2member-pro/includes/classes/sc-gift-codes-in.inc.php b/s2member-pro/includes/classes/sc-gift-codes-in.inc.php index e7cc04d0..ce0895bb 100644 --- a/s2member-pro/includes/classes/sc-gift-codes-in.inc.php +++ b/s2member-pro/includes/classes/sc-gift-codes-in.inc.php @@ -100,7 +100,7 @@ public static function shortcode($attr = array(), $content = '', $shortcode = '' { $gifts = $coupons_class->generate_gifts($attr); // Generate new gifts. $wpdb->query("DELETE FROM `".$wpdb->options."` WHERE `option_name` LIKE '%".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape('s2m_gcs_'.$post_id.'_'.$sp_hash.'_'))."%'"); - add_option($user->ID, $option_key_for_gifts, $gifts, '', 'no'); // Store the new gifts. + add_option($option_key_for_gifts, $gifts, '', 'no'); // Store the new gifts. } } else if($user->ID) // Do we have a user ID?