Changeset 2072276
- Timestamp:
- 04/22/2019 12:51:15 AM (7 years ago)
- Location:
- hostplugin-woocommerce-points-and-rewards/trunk
- Files:
-
- 13 edited
-
assets/images/message.png (modified) (previous)
-
assets/js/admin_script.js (modified) (2 diffs)
-
hostplugin-woocommerce-points-rewards.php (modified) (5 diffs)
-
includes/Account.php (modified) (2 diffs)
-
includes/Admin/Settings.php (modified) (8 diffs)
-
includes/Helper.php (modified) (2 diffs)
-
includes/Points.php (modified) (6 diffs)
-
includes/Product.php (modified) (2 diffs)
-
includes/Upgrade.php (modified) (3 diffs)
-
readme.txt (modified) (4 diffs)
-
templates/admin_dashboard.php (modified) (2 diffs)
-
templates/my_account.php (modified) (2 diffs)
-
templates/user_points_details.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hostplugin-woocommerce-points-and-rewards/trunk/assets/js/admin_script.js
r2018489 r2072276 10 10 quicktags({ 11 11 id: 'hp_woo_rewards_signup_message', 12 buttons: 'bold,italic,red,blue,brown,black' 13 }); 14 quicktags({ 15 id: 'hp_woo_rewards_review_message', 12 16 buttons: 'bold,italic,red,blue,brown,black' 13 17 }); … … 39 43 $('#hp_woo_rewards_signup_points_role').select2(); 40 44 45 $('#hp_woo_rewards_review_points_role').select2(); 46 41 47 $('#hp_woo_reset_settings').on('click', function(event) { 42 48 if (!window.confirm("Are you sure you wish to reset the settings to defaults?")) { -
hostplugin-woocommerce-points-and-rewards/trunk/hostplugin-woocommerce-points-rewards.php
r2018489 r2072276 7 7 Plugin URI: https://wordpress.org/plugins/hostplugin-woocommerce-points-and-rewards 8 8 Description: Reward your loyal customers for purchases and other actions using points which can be redeemed for discounts on future purchase. 9 Version: 1.0. 59 Version: 1.0.6 10 10 Author: HostPlugin.com 11 11 Author URI: http://www.hostplugin.com … … 26 26 use \HPWooRewardsIncludes\Deactivation; 27 27 use \HPWooRewardsIncludes\Product; 28 use \HPWooRewardsIncludes\Comments; 28 29 use \HPWooRewardsIncludes\Upgrade; 29 30 … … 43 44 public $cart_page; 44 45 public $admin_point_table; 46 public $comments; 45 47 46 48 /** … … 62 64 $order_class = Helper::get_class_name("\HPWooRewardsIncludes\Order"); 63 65 $account_class = Helper::get_class_name("\HPWooRewardsIncludes\Account"); 66 $comment_class = Helper::get_class_name("\HPWooRewardsIncludes\Comments"); 64 67 self::$instance->product_page = new Product(); 65 68 self::$instance->cart_page = new $cart_class(); 66 69 self::$instance->order = new $order_class(); 67 70 self::$instance->account = new $account_class(); 71 self::$instance->comments = new $comment_class(); 68 72 self::$instance->admin = new Admin(); 69 73 self::$instance->admin_settings = new $settings_class(); 70 self::$instance->admin_point_table = new PointTable(); 74 self::$instance->admin_point_table = new PointTable(); 71 75 self::$instance->load_update_checker(); 72 76 } … … 84 88 private function setup_constants() { 85 89 if ( ! defined( 'HOSTPLUGIN_WOO_POINTS_VERSION' ) ) { 86 define( 'HOSTPLUGIN_WOO_POINTS_VERSION', '1.0. 5' );90 define( 'HOSTPLUGIN_WOO_POINTS_VERSION', '1.0.6' ); 87 91 } 88 92 -
hostplugin-woocommerce-points-and-rewards/trunk/includes/Account.php
r2018489 r2072276 28 28 add_filter( 'query_vars', array($this, 'add_query_vars'), 0 ); 29 29 add_filter( 'woocommerce_account_menu_items', array($this, 'add_link') ); 30 add_action( 'woocommerce_account_hp-woo-rewards-points_endpoint', array($this, 'add_reward_content') );30 add_action( 'woocommerce_account_hp-woo-rewards-points_endpoint', array($this, 'add_reward_content'), 999 ); 31 31 add_action( 'wp_enqueue_scripts', array($this, 'add_frontend_script'), 999); 32 32 add_action( 'woocommerce_register_form_start', array($this, 'display_signup_points'), 10, 1 ); 33 33 add_action( 'user_register', array($this, 'add_signup_points'), 10, 1 ); 34 add_filter( 'woocommerce_product_review_comment_form_args',array($this,'display_review_points_message'),10,1); 34 35 }//show rewards points only if point system is enabled 35 36 } … … 98 99 99 100 /** 101 * Display review points message 102 * 103 * @since 1.0.6 104 * @param obj $comment_data 105 * @return obj $comment_data 106 * 107 */ 108 public function display_review_points_message($comment_data) { 109 110 error_log('HP-WOO-REWARDS: calling '.__FUNCTION__.' for comment: '.print_r($comment_data, true)); 111 112 $review_points = $this->points->get_review_points(); 113 114 $message = Helper::get_settings_option('review_message'); 115 $values = array( 116 'points_label' => $this->points->point_name, 117 'points' => $review_points 118 ); 119 $message = Helper::parse_customized_message($message, $values); 120 121 $html = ''; 122 if ($review_points > 0 && $comment_data && $comment_data['title_reply_before']) { 123 $html .= '<div class="woocommerce-message" role="alert">'; 124 $html .= $message; 125 $html .= '</div>'; 126 $comment_data['title_reply_before'] = $html . $comment_data['title_reply_before']; 127 } 128 129 return $comment_data; 130 } 131 132 133 /** 100 134 * Display how many points customer will earn when signing up a new account 101 135 * -
hostplugin-woocommerce-points-and-rewards/trunk/includes/Admin/Settings.php
r2018489 r2072276 78 78 79 79 add_settings_section("hp_woo_rewards_points_section", __("General Settings", 'hp-woo-rewards'), "hp_woo_rewards_points_section_callback", "hp_woo_rewards_points_settings"); 80 81 add_settings_section("hp_woo_rewards_points_signup_section", __("Signup Settings", 'hp-woo-rewards'), "hp_woo_rewards_points_section_callback", "hp_woo_rewards_points_settings"); 82 83 add_settings_section("hp_woo_rewards_points_review_section", __("Product Review Settings", 'hp-woo-rewards'), "hp_woo_rewards_points_section_callback", "hp_woo_rewards_points_settings"); 80 84 81 85 add_settings_section("hp_woo_rewards_points_refund_section", __("Refund Settings", 'hp-woo-rewards'), "hp_woo_rewards_points_section_callback", "hp_woo_rewards_points_settings"); … … 126 130 )); 127 131 128 add_settings_field("signup_points", __("Signup Points: ", 'hp-woo-rewards').wc_help_tip('Customer will get [x] points when signing up an account. Leave blank to disable', false), 'hp_woo_rewards_points_number_input', 'hp_woo_rewards_points_settings', 'hp_woo_rewards_points_section', 132 add_settings_field("max_points_discount", __("Maximum Points Discount").wc_help_tip('Set the maximum points discount can be redeemed in the cart. Leave blank to disable', false), 'hp_woo_rewards_points_field_max_points_discount', 'hp_woo_rewards_points_settings', 'hp_woo_rewards_points_section', 133 array( 134 'label_for' => 'max_points_discount', 135 'max_points_discount' => $option['max_points_discount'], 136 'max_points_discount_type' => $option['max_points_discount_type'], 137 'premium' => true) 138 ); 139 140 add_settings_field("min_purchase_amount", __("Minimum Purchase Amount").wc_help_tip('Set the minimum purchase amount in the shopping cart in order to redeem points. Leave blank to disable', false), 'hp_woo_rewards_points_number_input', 'hp_woo_rewards_points_settings', 'hp_woo_rewards_points_section', 141 array( 142 'label_for' => 'min_purchase_amount', 143 'value' => $option['min_purchase_amount'], 144 'money' => true, 145 'premium' => true) 146 ); 147 148 /**********************************************************************/ 149 /* Signup Section */ 150 /**********************************************************************/ 151 152 add_settings_field("signup_points", __("Signup Points: ", 'hp-woo-rewards').wc_help_tip('User will get [x] points when signing up an account. Leave blank to disable', false), 'hp_woo_rewards_points_number_input', 'hp_woo_rewards_points_settings', 'hp_woo_rewards_points_signup_section', 129 153 array( 130 154 'label_for' => 'signup_points', … … 134 158 135 159 $role_options = Helper::get_roles(true); 136 add_settings_field("signup_points_role", __("Who can earn signup points? ", 'hp-woo-rewards'), 'hp_woo_rewards_points_select', 'hp_woo_rewards_points_settings', 'hp_woo_rewards_points_s ection',160 add_settings_field("signup_points_role", __("Who can earn signup points? ", 'hp-woo-rewards'), 'hp_woo_rewards_points_select', 'hp_woo_rewards_points_settings', 'hp_woo_rewards_points_signup_section', 137 161 array( 138 162 'label_for' => 'signup_points_role', … … 145 169 ); 146 170 147 add_settings_field("max_points_discount", __("Maximum Points Discount").wc_help_tip('Set the maximum points discount can be redeemed in the cart. Leave blank to disable', false), 'hp_woo_rewards_points_field_max_points_discount', 'hp_woo_rewards_points_settings', 'hp_woo_rewards_points_section', 148 array( 149 'label_for' => 'max_points_discount', 150 'max_points_discount' => $option['max_points_discount'], 151 'max_points_discount_type' => $option['max_points_discount_type'], 152 'premium' => true) 153 ); 154 155 add_settings_field("min_purchase_amount", __("Minimum Purchase Amount").wc_help_tip('Set the minimum purchase amount in the shopping cart in order to redeem points. Leave blank to disable', false), 'hp_woo_rewards_points_number_input', 'hp_woo_rewards_points_settings', 'hp_woo_rewards_points_section', 156 array( 157 'label_for' => 'min_purchase_amount', 158 'value' => $option['min_purchase_amount'], 159 'money' => true, 160 'premium' => true) 171 /**********************************************************************/ 172 /* Review Section */ 173 /**********************************************************************/ 174 175 add_settings_field("review_points", __("Review Points: ", 'hp-woo-rewards').wc_help_tip('User will get [x] points when reviewing the product. Leave blank to disable', false), 'hp_woo_rewards_points_number_input', 'hp_woo_rewards_points_settings', 'hp_woo_rewards_points_review_section', 176 array( 177 'label_for' => 'review_points', 178 'value' => $option['review_points'] 179 ) 180 ); 181 182 add_settings_field("max_review_points_for_user", __("Maximum Review Points: ", 'hp-woo-rewards').wc_help_tip('Maximum Points One user can earn for reviewing products. Leave blank to disable', false), 'hp_woo_rewards_points_number_input', 'hp_woo_rewards_points_settings', 'hp_woo_rewards_points_review_section', 183 array( 184 'label_for' => 'max_review_points_for_user', 185 'value' => $option['max_review_points_for_user'], 186 'premium' => true 187 ) 188 ); 189 190 add_settings_field("user_cannot_earn_points_for_reviewing_same_product", __("User cannot earn points for reviewing the same product?", 'hp-woo-rewards'), 'hp_woo_rewards_points_checkbox', 'hp_woo_rewards_points_settings', 'hp_woo_rewards_points_review_section', 191 array( 192 'label_for' => 'user_cannot_earn_points_for_reviewing_same_product', 193 'value' => $option['user_cannot_earn_points_for_reviewing_same_product'], 194 'premium' => true 195 ) 196 ); 197 198 add_settings_field("review_points_role", __("Who can earn review points? ", 'hp-woo-rewards'), 'hp_woo_rewards_points_select', 'hp_woo_rewards_points_settings', 'hp_woo_rewards_points_review_section', 199 array( 200 'label_for' => 'review_points_role', 201 'options' => $role_options, 202 'multiple' => true, 203 'id' => 'hp_woo_rewards_review_points_role', 204 'value' => $option['review_points_role'], 205 'premium' => true 206 ) 161 207 ); 162 208 … … 209 255 'label_for' => 'signup_message', 210 256 'value' => $option['signup_message'], 257 'premium' => true) 258 ); 259 260 add_settings_field("review_message", __("Add a Review message"), 'hp_woo_rewards_points_textarea', 'hp_woo_rewards_points_settings', 'hp_woo_rewards_points_message_section', 261 array( 262 'label_for' => 'review_message', 263 'value' => $option['review_message'], 211 264 'premium' => true) 212 265 ); … … 269 322 $defaults = Helper::get_default_settings(); 270 323 271 if ( $_POST['hp_woo_reset_settings']) {324 if (isset($_POST['hp_woo_reset_settings'])) { 272 325 //reset to defaults 273 326 $validated = $defaults; … … 282 335 $validated['redeem_dollar'] = ((int)$input['redeem_dollar'] <= 0) ? 1: (int)$input['redeem_dollar']; 283 336 $validated['signup_points'] = ((int)$input['signup_points'] <= 0) ? '': (int)$input['signup_points']; 337 $validated['review_points'] = ((int)$input['review_points'] <= 0) ? '': (int)$input['review_points']; 338 284 339 $validated['min_purchase_amount'] = (int)$input['min_purchase_amount']; 285 340 if ($validated['min_purchase_amount'] == 0) $validated['min_purchase_amount'] = ""; … … 303 358 304 359 $validated['signup_message'] = $defaults['signup_message']; 360 $validated['review_message'] = $defaults['review_message']; 305 361 $validated['single_product_message'] = $defaults['single_product_message']; 306 362 $validated['cart_checkout_message'] = $defaults['cart_checkout_message']; -
hostplugin-woocommerce-points-and-rewards/trunk/includes/Helper.php
r2018489 r2072276 20 20 'redeem_dollar' => '1', 21 21 'signup_points' => '50', 22 'review_points' => '10', 23 'max_review_points_for_user' => '', 22 24 'min_purchase_amount' => '10', 23 25 'max_points_discount' => '', … … 28 30 'round_off' => 'nearest-integer', 29 31 'signup_points_role' => array('customer'), 32 'review_points_role' => array('customer'), 33 'user_cannot_earn_points_for_reviewing_same_product' => 'on', 30 34 'disable_point_when_using_coupon' => 'on', 31 35 'no_earn_point_when_using_coupon' => 'on', 32 36 'signup_message' => 'Sign up now and receive [bold]{points} {points_label}[/bold]', 37 'review_message' => 'Add your review and receive [bold]{points} {points_label}[/bold]', 33 38 'single_product_message' => 'Purchase this product and earn [bold]{points} {points_label}[/bold]', 34 39 'cart_checkout_message' => 'Complete your order and earn [bold]{points} {points_label}[/bold] for a discount on a future purchase', -
hostplugin-woocommerce-points-and-rewards/trunk/includes/Points.php
r1924295 r2072276 18 18 const LOG_TYPE_PURCHASE_REWARDS = 1; //(+) receive purchase rewards 19 19 const LOG_TYPE_REDEEM_REWARDS = 2; //(-) redeem points 20 const LOG_TYPE_SIGNUP_REWARDS = 3; //( -) get signup rewards20 const LOG_TYPE_SIGNUP_REWARDS = 3; //(+) get signup rewards 21 21 const LOG_TYPE_ADJUSTMENT_BY_SELLER = 4; //(+/-) manually adjust by admin / seller 22 const LOG_TYPE_REVIEW_REWARDS = 5; //(+) get review rewards 22 23 23 24 /** … … 175 176 176 177 /** 178 * Get review points (points for reviewing 1 product) defined in the admin settings 179 * 180 * @since 1.0.6 181 * @return mixed 182 * 183 */ 184 public function get_review_points() { 185 if ((int)$this->option['review_points'] > 0) 186 return (int)$this->option['review_points']; 187 188 return false; 189 } 190 191 /** 177 192 * Add points details for a particular customer 178 193 * … … 222 237 * @param const $log_type 223 238 * @param int $order_id (optional) 239 * @param int $product_id (optional) 224 240 * @return boolean 225 241 * 226 242 */ 227 protected function update_customer_points_details($customer_id = 0, $points_string = '', $note, $log_type, $order_id = null ) {243 protected function update_customer_points_details($customer_id = 0, $points_string = '', $note, $log_type, $order_id = null, $comment_id = null) { 228 244 error_log('HP-WOO-REWARDS: calling '.__FUNCTION__.' Customer ID: '.$customer_id); 229 245 … … 235 251 $detail = array( 236 252 'order_id' => $order_id, 253 'comment_id' => $comment_id, 237 254 'date' => $today_date, 238 255 'event' => $note, … … 309 326 * 310 327 */ 311 protected function is_already_processed($order_id, $customer_id, $log_type ) {312 error_log('HP-WOO-REWARDS: calling '.__FUNCTION__.' for order ID: '.$order_id. ' and customer: '.$customer_id. ' for log type: '.$log_type);328 protected function is_already_processed($order_id, $customer_id, $log_type, $comment_id = null) { 329 error_log('HP-WOO-REWARDS: calling '.__FUNCTION__.' for order ID: '.$order_id. ' comment id: '.$comment_id . ' and customer: '.$customer_id. ' for log type: '.$log_type); 313 330 $points_details = $this->get_customer_points_details($customer_id); 314 331 error_log('HP-WOO-REWARDS: points details: '.print_r($points_details, true)); 315 332 foreach ($points_details as $detail) { 316 317 if ( ($order_id == 0 || $detail['order_id'] == $order_id) && $detail['event_type'] == $log_type ) { 318 error_log('HP-WOO-REWARDS: Already processed points: '. $detail['points'].' to customer account'); 319 return (int)$detail['points']; 333 if ($comment_id > 0) { 334 //review type 335 if ($detail['event_type'] == $log_type && $detail['comment_id'] == $comment_id) { 336 error_log('HP-WOO-REWARDS: Already processed points: '. $detail['points'].' to customer account'); 337 return (int)$detail['points']; 338 } 339 } 340 else { 341 //other type 342 if ( ($order_id == 0 || $detail['order_id'] == $order_id) && $detail['event_type'] == $log_type ) { 343 error_log('HP-WOO-REWARDS: Already processed points: '. $detail['points'].' to customer account'); 344 return (int)$detail['points']; 345 } 320 346 } 321 347 }//foreach … … 368 394 369 395 /** 396 * Add review points for customer 397 * 398 * @since 1.0.6 399 * @param int $customer_id 400 * @param int $review_points 401 * @return void 402 * 403 */ 404 public function add_review_point_for_customer($customer_id, $comment_id, $review_points) { 405 error_log('HP-WOO-REWARDS: calling '.__FUNCTION__.' Customer ID: '.$customer_id.' Review points to add: '.$review_points); 406 407 if ($review_points > 0 && $this->is_already_processed(0, $customer_id, self::LOG_TYPE_REVIEW_REWARDS, $comment_id) === false) { 408 $this->update_customer_points($customer_id, $review_points); 409 $point_string = "+".$review_points; 410 411 $event = __('{points_label} earned for reviewing product', 'hp-woo-rewards'); 412 $this->update_customer_points_details($customer_id, $point_string, $event, self::LOG_TYPE_REVIEW_REWARDS, $order_id = null, $comment_id); 413 } 414 } 415 416 /** 370 417 * admin (or whoever can update points on admin side) update user points 371 418 * -
hostplugin-woocommerce-points-and-rewards/trunk/includes/Product.php
r1924295 r2072276 27 27 28 28 if ($this->points->is_point_system_enabled() == true) { 29 add_action( 'woocommerce_single_product_summary', array($this,'show_points'), 15 ); 29 //quick fix for theme Hotel Queen as it doesn't call woocommerce_single_product_summary 30 $theme = wp_get_theme(); 31 32 if ( stripos($theme->name, 'Hotel Queen') !== false ) { 33 add_action( 'hotel_booking_single_price', array($this,'show_points'), 15 ); 34 } 35 else { 36 add_action( 'woocommerce_single_product_summary', array($this,'show_points'), 15 ); 37 } 30 38 } 31 39 } … … 85 93 $message =Helper::parse_customized_message($message, $values); 86 94 87 echo "<p>";88 echo $message;89 echo "</p>";90 91 95 $customer_id = get_current_user_id(); 92 96 $existing_points = $this->points->get_customer_total_points($customer_id); -
hostplugin-woocommerce-points-and-rewards/trunk/includes/Upgrade.php
r1949889 r2072276 32 32 //if database version is less than 1.0.3 33 33 if (version_compare($db_version, '1.0.3', '<')) { 34 self::update_database_1(); 34 self::update_database_1_0_3(); 35 } 36 37 //if database version is less than 1.0.6 38 if (version_compare($db_version, '1.0.6', '<')) { 39 self::update_database_1_0_6(); 35 40 } 36 41 … … 43 48 * @return void 44 49 */ 45 public static function update_database_1 () {50 public static function update_database_1_0_3() { 46 51 error_log('HP-WOO-REWARDS: calling '.__FUNCTION__); 47 52 $database_option = get_option( 'hp_woo_rewards_points_settings_option' ); … … 57 62 } 58 63 } 64 65 /** 66 * upgrade database for v1.0.6 67 * @return void 68 */ 69 public static function update_database_1_0_6() { 70 error_log('HP-WOO-REWARDS: calling '.__FUNCTION__); 71 $database_option = get_option( 'hp_woo_rewards_points_settings_option' ); 72 error_log('HP-WOO-REWARDS: Before update: '.print_r($database_option, true)); 73 74 if (isset($database_option['review_points']) && !empty($database_option['review_points'])) { 75 ; 76 } 77 else { 78 $database_option['review_points'] = Helper::get_default_settings('review_points'); 79 } 80 81 if (isset($database_option['review_points_role']) && !empty($database_option['review_points_role'])) { 82 ; 83 } 84 else { 85 $database_option['review_points_role'] = Helper::get_default_settings('review_points_role'); 86 } 87 88 if (isset($database_option['max_review_points_for_user']) && !empty($database_option['max_review_points_for_user'])) { 89 ; 90 } 91 else { 92 $database_option['max_review_points_for_user'] = Helper::get_default_settings('max_review_points_for_user'); 93 } 94 95 if (isset($database_option['user_cannot_earn_points_for_reviewing_same_product']) && !empty($database_option['user_cannot_earn_points_for_reviewing_same_product'])) { 96 ; 97 } 98 else { 99 $database_option['user_cannot_earn_points_for_reviewing_same_product'] = Helper::get_default_settings('user_cannot_earn_points_for_reviewing_same_product'); 100 } 101 102 error_log('HP-WOO-REWARDS: After update: '.print_r($database_option, true)); 103 update_option( 'hp_woo_rewards_points_settings_option', $database_option ); 104 } 59 105 } -
hostplugin-woocommerce-points-and-rewards/trunk/readme.txt
r2018489 r2072276 4 4 Tags: points, rewards, points and rewards, woocommerce points and rewards, loyalty program, point, reward, awards, credit, credits, loyalty, customer, customer loyalty, customer loyalty program, woocommerce loyalty program, woocommerce, woocommerce points, woocommerce rewards, woocommerce discount, woocommerce plugin, woocommerce extenions, cashback, coupon, coupons, hostplugin 5 5 Requires at least: 4.0.1 6 Tested up to: 5. 0.37 Stable tag: 1.0. 56 Tested up to: 5.1.1 7 Stable tag: 1.0.6 8 8 Requires PHP: 5.3.8 9 9 License: GPLv2 or later … … 21 21 22 22 * Free Rewards Points System for WooCommerce 23 * Reward points for product purchase & signup23 * Reward points for product purchase, signup & product review 24 24 * Define how many reward points can be earned for purchases 25 25 * Define the value of points for discounts … … 34 34 * Option to disable customers from earning points if coupons are use (Premium Feature) 35 35 * Option to set which roles (Admins, Customers, Editors etc) can earn signup points (Premium Feature) 36 * Option to set maximum points for reviewing products (Premium Feature) 37 * Option to set which roles (Admins, Customers, Editors etc) can earn review points (Premium Feature) 38 * Option to disable rewarding points for reviewing the same product (Premium Feature) 36 39 * Set the minimum purchase amount in order to redeem points (Premium Feature) 37 40 * Completely control the maximum discount available when redeeming points (Premium Feature) … … 81 84 == Changelog == 82 85 86 = 1.0.6 = 87 Added feature - reward points for reviewing products 88 Added premium feature - Maximum review points one can get 89 Added premium feature - Option to disable points for reviewing the same product 90 Added premium feature - who can earn product review points 91 Fixed - Who can earn signup points not working when setting to All 92 Fixed - Signup points cannot be set to blank 93 Fixed - Sometimes points sidebar link not showing up on customer login area 94 Fixed - Points not showing up on theme: https://themeforest.net/item/hotelqueen-hotel-wordpress-theme/20466233 product page 95 83 96 = 1.0.5 = 84 97 Added premium feature - ability to customize the color of the front-end messages 85 98 Allow Admin Settings reset back to defaults 86 Fixed Bug - Signup points cannot be set to blank87 99 88 100 = 1.0.4 = -
hostplugin-woocommerce-points-and-rewards/trunk/templates/admin_dashboard.php
r1991977 r2072276 51 51 <li> 52 52 <h2>Premium Version</h2> 53 Our premium version provides more features and functionalities that gives you more control over your WooCommerce store! To get a copy of our premium version simply donate at least US$25 and we will email you the plugin zip file within 1 business day. <a href="https://www.hostplugin.com/woo-comparison.php" target="_blank">Please take a look on the feature comparison to see how the Premium Version can reward your loyal customers even more!</a>53 Our premium version provides more features and functionalities that gives you more control over your WooCommerce store! For a limited time, To get a copy of our premium version simply donate at least US$29.99 and we will email you the plugin zip file within 1 business day (Don't forget to include your domain name, ie. yourdomain.com in the special instruction section to avoid any delay). <a href="https://www.hostplugin.com/woo-comparison.php" target="_blank">Please take a look on the feature comparison to see how the Premium Version can reward your loyal customers even more!</a> 54 54 <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> 55 55 <input type="hidden" name="cmd" value="_s-xclick"> … … 78 78 - Option to remove points for refunded / cancelled orders<br> 79 79 - Option to return redeemed points for refunded / cancelled orders 80 </li> 81 </ul> 82 </section> 83 84 <section> 85 <ul> 86 <li><img src="<?php echo HOSTPLUGIN_PLUGIN_URL; ?>/assets/images/review.png"></li> 87 <li> 88 <h2>Product Review</h2> 89 - Option to set maximum review points one can get<br> 90 - Option to disable points for reviewing the same product<br> 91 - who can earn product review points<br> 80 92 </li> 81 93 </ul> -
hostplugin-woocommerce-points-and-rewards/trunk/templates/my_account.php
r1924295 r2072276 13 13 <th class="woocommerce-orders-table__header"><span class="nobr">Date</span></th> 14 14 <th class="woocommerce-orders-table__header"><span class="nobr">Order ID</span></th> 15 <th class="woocommerce-orders-table__header"><span class="nobr">Comment ID</span></th> 15 16 <th class="woocommerce-orders-table__header"><span class="nobr">Event</span></th> 16 17 <th class="woocommerce-orders-table__header"><span class="nobr"><?php echo $point_name ?></span></th> … … 38 39 </td> 39 40 <td class="woocommerce-orders-table__cell woocommerce-orders-table__cell-"> 41 <?php 42 if (!empty($detail['comment_id'])) { 43 $comment_url = get_comment_link( $detail['comment_id'] ); 44 ?> 45 <a href="<?php echo $comment_url ?>"> 46 <?php echo _x( '#', 'hash before order number', 'woocommerce' ) . $detail['comment_id']; ?> 47 </a> 48 <?php 49 } 50 ?> 51 </td> 52 <td class="woocommerce-orders-table__cell woocommerce-orders-table__cell-"> 40 53 <?php echo $detail['event']?> 41 54 </td> -
hostplugin-woocommerce-points-and-rewards/trunk/templates/user_points_details.php
r1926469 r2072276 22 22 <thead> 23 23 <tr> 24 <th scope="col" id="hp_woo_rewards_log_date" class="manage-column column-date column-primary">Date</th> 24 <th scope="col" id="hp_woo_rewards_log_date" class="manage-column column-date column-primary">Date</th> 25 25 <th scope="col" id="hp_woo_rewards_log_order_id" class="manage-column column-format">Order ID</th> 26 <th scope="col" id="hp_woo_rewards_log_comment_id" class="manage-column column-format">Comment ID</th> 26 27 <th scope="col" id="hp_woo_rewards_log_event" class="manage-column column-event">Event</th> 27 28 <th scope="col" id="hp_woo_rewards_log_point" class="manage-column column-format">Points</th> … … 32 33 33 34 foreach ($purchase_details as $detail) { 35 34 36 $detail['event'] = $this->points->parse_point_name($detail['event']); 35 37 ?> … … 39 41 <td class="log_order_id column-order_id"> 40 42 <?php 41 if ( strlen($detail['order_id']) > 0) {43 if (isset($detail['order_id']) && strlen($detail['order_id']) > 0) { 42 44 ?> 43 45 <a href="<?php echo admin_url( 'post.php?post='.$detail['order_id'].'&action=edit');?>">#<?php echo $detail['order_id']?></a> 46 <?php 47 } 48 ?> 49 </td> 50 <td class="log_comment_id column-comment_id"> 51 <?php 52 if (isset($detail['comment_id']) && strlen($detail['comment_id']) > 0) { 53 ?> 54 <a href="<?php echo get_comment_link( $detail['comment_id'] );?>">#<?php echo $detail['comment_id']?></a> 44 55 <?php 45 56 } … … 57 68 <th scope="col" id="hp_woo_rewards_log_date" class="manage-column column-date column-primary">Date</th> 58 69 <th scope="col" id="hp_woo_rewards_log_order_id" class="manage-column column-format">Order ID</th> 70 <th scope="col" id="hp_woo_rewards_log_comment_id" class="manage-column column-format">Comment ID</th> 59 71 <th scope="col" id="hp_woo_rewards_log_event" class="manage-column column-event">Event</th> 60 72 <th scope="col" id="hp_woo_rewards_log_point" class="manage-column column-format">Points</th>
Note: See TracChangeset
for help on using the changeset viewer.