Changeset 3369775
- Timestamp:
- 09/29/2025 01:52:59 PM (6 months ago)
- Location:
- restock-alerts-for-woocommerce
- Files:
-
- 62 added
- 11 edited
-
tags/1.1.0 (added)
-
tags/1.1.0/CHANGELOG.md (added)
-
tags/1.1.0/common (added)
-
tags/1.1.0/common/admin (added)
-
tags/1.1.0/common/admin/class-admin.php (added)
-
tags/1.1.0/common/admin/class-notify-list-table.php (added)
-
tags/1.1.0/common/admin/view (added)
-
tags/1.1.0/common/admin/view/email-templates.php (added)
-
tags/1.1.0/common/admin/view/settings-page.php (added)
-
tags/1.1.0/common/includes (added)
-
tags/1.1.0/common/includes/class-hooks.php (added)
-
tags/1.1.0/common/includes/class-utils.php (added)
-
tags/1.1.0/common/public (added)
-
tags/1.1.0/common/public/assets (added)
-
tags/1.1.0/common/public/assets/css (added)
-
tags/1.1.0/common/public/assets/css/main.css (added)
-
tags/1.1.0/common/public/assets/js (added)
-
tags/1.1.0/common/public/assets/js/main.js (added)
-
tags/1.1.0/common/public/class-frontend.php (added)
-
tags/1.1.0/core (added)
-
tags/1.1.0/core/assets (added)
-
tags/1.1.0/core/assets/css (added)
-
tags/1.1.0/core/assets/css/admin.css (added)
-
tags/1.1.0/core/assets/css/metabox.css (added)
-
tags/1.1.0/core/assets/css/onboarding.css (added)
-
tags/1.1.0/core/assets/js (added)
-
tags/1.1.0/core/assets/js/admin.js (added)
-
tags/1.1.0/core/assets/js/metabox.js (added)
-
tags/1.1.0/core/class-admin.php (added)
-
tags/1.1.0/core/class-cron-logs-table.php (added)
-
tags/1.1.0/core/class-cron-scheduler.php (added)
-
tags/1.1.0/core/class-emailer.php (added)
-
tags/1.1.0/core/class-frontend-template.php (added)
-
tags/1.1.0/core/class-list-table.php (added)
-
tags/1.1.0/core/class-logger.php (added)
-
tags/1.1.0/core/class-metabox.php (added)
-
tags/1.1.0/core/class-onboarding.php (added)
-
tags/1.1.0/core/class-schedule-logger.php (added)
-
tags/1.1.0/core/class-settings.php (added)
-
tags/1.1.0/core/class-template-factory.php (added)
-
tags/1.1.0/core/class-utils.php (added)
-
tags/1.1.0/core/init-core.php (added)
-
tags/1.1.0/core/views (added)
-
tags/1.1.0/core/views/dashboard.php (added)
-
tags/1.1.0/core/views/license.php (added)
-
tags/1.1.0/core/views/status.php (added)
-
tags/1.1.0/includes (added)
-
tags/1.1.0/includes/class-restaler.php (added)
-
tags/1.1.0/languages (added)
-
tags/1.1.0/languages/restock-alerts-for-woocommerce.pot (added)
-
tags/1.1.0/onboarding (added)
-
tags/1.1.0/onboarding/step-finish.php (added)
-
tags/1.1.0/onboarding/step-settings.php (added)
-
tags/1.1.0/onboarding/step-welcome.php (added)
-
tags/1.1.0/readme.txt (added)
-
tags/1.1.0/restock-alerts-for-woocommerce.php (added)
-
tags/1.1.0/templates (added)
-
tags/1.1.0/templates/email (added)
-
tags/1.1.0/templates/email/email-content.php (added)
-
tags/1.1.0/templates/email/email-footer.php (added)
-
tags/1.1.0/templates/email/email-header.php (added)
-
tags/1.1.0/templates/notify-form.php (added)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/common/admin/class-admin.php (modified) (3 diffs)
-
trunk/common/admin/view/email-templates.php (modified) (2 diffs)
-
trunk/common/admin/view/settings-page.php (modified) (6 diffs)
-
trunk/common/includes/class-hooks.php (modified) (4 diffs)
-
trunk/common/public/class-frontend.php (modified) (3 diffs)
-
trunk/core/assets/css/admin.css (modified) (1 diff)
-
trunk/core/class-emailer.php (modified) (2 diffs)
-
trunk/core/class-list-table.php (modified) (9 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/restock-alerts-for-woocommerce.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
restock-alerts-for-woocommerce/trunk/CHANGELOG.md
r3368780 r3369775 1 1 == Changelog == 2 2 3 = 1.0.0 = 3 = 1.1.0 2025-09-29 = 4 * Add - Export feature added. 5 * Add - Follow-up email sequence added. 6 * Add - Can able to generate and send unique discount on finl follow-up email. 7 * Add - Email templates added follow-up emails. 8 * Add - Conditional tags added in email templates. 9 * Fix - Security issue resolved in notification list table. 4 10 5 * Enhancement - Initial Release 11 = 1.0.0 2025-09-26 = 12 * Initial Release -
restock-alerts-for-woocommerce/trunk/common/admin/class-admin.php
r3368780 r3369775 45 45 add_action( 'wp_insert_post', array( $this, 'save_product' ), 99, 3 ); 46 46 add_action( 'woocommerce_order_status_completed', array( $this, 'order_completed' ) ); 47 48 // It should run before initialize table. 49 add_filter( 'restock_alerts_table_allow_export_csv', '__return_true' ); 50 add_filter( 'restock_alerts_table_csv_export_columns', array( $this, 'csv_export_columns' ), 99 ); 51 add_filter( 'restock_alerts_table_bulk_actions', array( $this, 'bulk_actions' ), 99 ); 52 } 53 54 public function bulk_actions( $actions = array() ) { 55 $actions['export_csv'] = esc_html__( 'Export to CSV', 'restock-alerts-for-woocommerce' ); 56 return $actions; 57 } 58 59 public function csv_export_columns() { 60 return array( 61 'id' => esc_html__( 'ID', 'restock-alerts-for-woocommerce' ), 62 'email' => esc_html__( 'Email', 'restock-alerts-for-woocommerce' ), 63 'product_id' => esc_html__( 'Product', 'restock-alerts-for-woocommerce' ), 64 'variation_id' => esc_html__( 'Variation', 'restock-alerts-for-woocommerce' ), 65 'status' => esc_html__( 'Status', 'restock-alerts-for-woocommerce' ), 66 'created_at' => esc_html__( 'Created At', 'restock-alerts-for-woocommerce' ), 67 ); 47 68 } 48 69 … … 186 207 $content = get_option( 187 208 'restaler_back_in_stock_email_content', 188 array( 189 'html' => "The product you were waiting for is now back in stock 209 "The product you were waiting for is now back in stock 190 210 191 211 {product_name}{variation} … … 195 215 196 216 Warmly, 197 The {site_name} Team", 198 ) 217 The {site_name} Team" 199 218 ); 200 219 -
restock-alerts-for-woocommerce/trunk/common/admin/view/email-templates.php
r3368780 r3369775 40 40 The {site_name} Team"; 41 41 42 $first_follow_up_email_html = "Hi{customer_name}, 43 44 We just wanted to check in - did you get a chance to explore {product_name}? 45 46 If you're still thinking it over, no rush! We're here if you have any questions or need help deciding if it's the right fit for you. 47 48 {buy_now} 49 50 Sometimes all it takes is a second look. 51 52 Warmly, 53 The {site_name} Team"; 54 55 $second_follow_up_email_html = "Hi{customer_name}, 56 57 Just a quick reminder - your {discount} off discount code is expiring in {coupon_expires} days 58 59 If you've been thinking about getting {product_name}, now's the perfect time. This is your last chance to grab it at a lower price before the offer disappears. 60 61 Use code: {coupon_code} 62 Expires in: {coupon_expires} days 63 64 {buy_now} 65 66 Don't miss out - after this, it's back to full price. 67 68 Warmly, 69 The {site_name} Team"; 70 42 71 $fields = array( 43 72 esc_html__( 'Verification Email', 'restock-alerts-for-woocommerce' ) => array( … … 108 137 'type' => 'textarea', 109 138 'default' => '', 139 ), 140 ), 141 esc_html__( 'First Follow Up Email', 'restock-alerts-for-woocommerce' ) => array( 142 array( 143 'id' => 'restaler_first_follow_up_email_subject', 144 'label' => esc_html__( 'Subject', 'restock-alerts-for-woocommerce' ), 145 'type' => 'text', 146 'default' => esc_html__( 'Still on your mind?', 'restock-alerts-for-woocommerce' ), 147 ), 148 array( 149 'id' => 'restaler_first_follow_up_email_heading', 150 'label' => esc_html__( 'Heading', 'restock-alerts-for-woocommerce' ), 151 'type' => 'text', 152 'default' => esc_html__( 'Still on your mind?', 'restock-alerts-for-woocommerce' ), 153 ), 154 array( 155 'id' => 'restaler_first_follow_up_email_content', 156 'label' => esc_html__( 'Email Content', 'restock-alerts-for-woocommerce' ), 157 'type' => 'richtext_editor', 158 'options' => array( 'html' ), 159 'default_editor' => 'html', 160 'default' => array( 161 'html' => $first_follow_up_email_html, 162 'css' => '', 163 ), 164 'description' => 'You can use {product_name}, {buy_now}, {customer_name}, {site_name}, {site_url} in the editor.', 165 ), 166 array( 167 'id' => 'restaler_first_follow_up_email_footer_text', 168 'label' => esc_html__( 'Footer Text', 'restock-alerts-for-woocommerce' ), 169 'type' => 'textarea', 170 'default' => esc_html__( 'Thanks again for your interest!', 'restock-alerts-for-woocommerce' ), 171 ), 172 ), 173 esc_html__( 'Second Follow Up Email', 'restock-alerts-for-woocommerce' ) => array( 174 array( 175 'id' => 'restaler_second_follow_up_email_subject', 176 'label' => esc_html__( 'Subject', 'restock-alerts-for-woocommerce' ), 177 'type' => 'text', 178 'default' => esc_html__( 'Last Chance! {discount} Off Ends in {coupon_expires} Days', 'restock-alerts-for-woocommerce' ), 179 ), 180 array( 181 'id' => 'restaler_second_follow_up_email_heading', 182 'label' => esc_html__( 'Heading', 'restock-alerts-for-woocommerce' ), 183 'type' => 'text', 184 'default' => esc_html__( 'Your {discount} Discount Is About to Expire', 'restock-alerts-for-woocommerce' ), 185 ), 186 array( 187 'id' => 'restaler_second_follow_up_email_content', 188 'label' => esc_html__( 'Email Content', 'restock-alerts-for-woocommerce' ), 189 'type' => 'richtext_editor', 190 'options' => array( 'html' ), 191 'default_editor' => 'html', 192 'default' => array( 193 'html' => $second_follow_up_email_html, 194 'css' => '', 195 ), 196 'description' => 'You can use {product_name}, {buy_now}, {discount}, {coupon_expires}, {coupon_code}, {customer_name}, {site_name}, {site_url} in the editor.', 197 ), 198 array( 199 'id' => 'restaler_second_follow_up_email_footer_text', 200 'label' => esc_html__( 'Footer Text', 'restock-alerts-for-woocommerce' ), 201 'type' => 'textarea', 202 'default' => esc_html__( 'Thanks again for your interest!', 'restock-alerts-for-woocommerce' ), 110 203 ), 111 204 ), -
restock-alerts-for-woocommerce/trunk/common/admin/view/settings-page.php
r3368780 r3369775 60 60 'type' => 'checkbox', 61 61 'default' => '0', 62 'pro' => true,63 62 ), 64 63 array( … … 67 66 'type' => 'number', 68 67 'default' => 2, 69 'pro' => true,70 68 ), 71 69 array( … … 74 72 'type' => 'number', 75 73 'default' => 3, 76 'pro' => true,77 74 ), 78 75 array( … … 84 81 'fixed_cart' => esc_html__( 'Fixed cart discount', 'restock-alerts-for-woocommerce' ), 85 82 ), 86 'pro' => true,87 83 ), 88 84 array( … … 91 87 'type' => 'number', 92 88 'default' => 20, 93 'pro' => true,94 89 ), 95 90 array( … … 98 93 'type' => 'number', 99 94 'default' => 3, 100 'pro' => true,101 95 ), 102 96 ), -
restock-alerts-for-woocommerce/trunk/common/includes/class-hooks.php
r3368780 r3369775 10 10 namespace RESTALER; 11 11 12 use Pelago\Emogrifier\CssInliner; 13 12 14 defined( 'ABSPATH' ) || exit; 13 15 … … 22 24 public function __construct() { 23 25 $this->register_mail_tags(); 26 add_action( 'restaler_alert_email_sent', array( $this, 'alert_email_sent' ), 10, 2 ); 24 27 } 25 28 … … 82 85 'variation', 83 86 function ( $args ) { 87 $variation_name = false; 88 84 89 $variation_id = isset( $args['variation_id'] ) ? $args['variation_id'] : 0; 85 90 $variation = wc_get_product( $variation_id ); … … 96 101 } 97 102 ); 103 104 restaler()->emailer->register_shortcode( 105 'coupon_code', 106 function ( $args ) { 107 return isset( $args['coupon'] ) ? $args['coupon'] : ''; 108 } 109 ); 110 111 restaler()->emailer->register_shortcode( 112 'coupon_expires', 113 function ( $args ) { 114 return isset( $args['coupon_expires_in'] ) ? $args['coupon_expires_in'] : ''; 115 } 116 ); 117 118 restaler()->emailer->register_shortcode( 119 'discount', 120 function ( $args ) { 121 $discount_type = isset( $args['discount_type'] ) ? $args['discount_type'] : ''; 122 $amount = isset( $args['amount'] ) ? $args['amount'] : ''; 123 124 return ( 'percent' === $discount_type ) ? $amount . '%' : $amount; 125 } 126 ); 127 } 128 129 public function alert_email_sent( $row = array(), $product = array() ) { 130 131 $enable_followup = get_option( 'restaler_enable_followup', '' ); 132 133 $discount_type = get_option( 'restaler_discount_type', 'percent' ); 134 $amount = get_option( 'restaler_discount_amount', 20 ); 135 $first_followup_days = get_option( 'restaler_first_followup_days', 2 ); 136 $second_followup_days = get_option( 'restaler_second_followup_days', 3 ); 137 $coupon_expires_in = get_option( 'restaler_coupon_expires_in', 3 ); 138 139 $first_followup = time() + ( $first_followup_days * DAY_IN_SECONDS ); // 2 days later 140 $second_followup = $first_followup + ( $second_followup_days * DAY_IN_SECONDS ); // 5 days total 141 142 $coupon_expires = $second_followup + ( $coupon_expires_in * DAY_IN_SECONDS ); // Add 3 days. 143 $coupon_expires_date = gmdate( 'd-m-Y', $coupon_expires ); 144 145 $args = array( 146 'product' => $product, 147 'discount_type' => $discount_type, 148 'amount' => $amount, 149 'coupon_expires_date' => $coupon_expires_date, 150 ); 151 152 $coupon = Utils::generate_discount( $args ); 153 154 $email = $row['email']; 155 $product_id = $row['product_id']; 156 157 $first_follow_up_subject = get_option( 'restaler_first_follow_up_email_subject', esc_html__( 'Just a Quick Reminder', 'restock-alerts-for-woocommerce' ) ); 158 $second_follow_up_subject = get_option( 'restaler_second_follow_up_email_subject', esc_html__( 'Last Chance! 20% Off Ends in 3 Days', 'restock-alerts-for-woocommerce' ) ); 159 160 $first_follow_up_heading = get_option( 'restaler_first_follow_up_email_heading', esc_html__( 'Confirm your email', 'restock-alerts-for-woocommerce' ) ); 161 $first_follow_up_footer_text = get_option( 162 'restaler_first_follow_up_email_footer_text', 163 esc_html__( 164 'You\'re receiving this email because you registered with {site_name}. 165 166 If you didn\'t request this, please ignore it.', 167 'restock-alerts-for-woocommerce' 168 ) 169 ); 170 171 $first_follow_up_content = get_option( 172 'restaler_first_follow_up_email_content', 173 "Hi{customer_name}, 174 175 We just wanted to check in - did you get a chance to explore {product_name}? 176 177 If you're still thinking it over, no rush! We're here if you have any questions or need help deciding if it's the right fit for you. 178 179 {buy_now} 180 181 Sometimes all it takes is a second look. 182 183 Warmly, 184 The {site_name} Team" 185 ); 186 187 $second_follow_up_heading = get_option( 'restaler_second_follow_up_email_heading', esc_html__( 'Confirm your email', 'restock-alerts-for-woocommerce' ) ); 188 $second_follow_up_footer_text = get_option( 189 'restaler_second_follow_up_email_footer_text', 190 esc_html__( 191 'You\'re receiving this email because you registered with {site_name}. 192 193 If you didn\'t request this, please ignore it.', 194 'restock-alerts-for-woocommerce' 195 ) 196 ); 197 198 $second_follow_up_content = get_option( 199 'restaler_second_follow_up_email_content', 200 "Hi{customer_name}, 201 202 Just a quick reminder - your {discount} off discount code is expiring in {coupon_expires} days 203 204 If you've been thinking about getting {product_name}, now's the perfect time. This is your last chance to grab it at a lower price before the offer disappears. 205 206 Use code: {coupon_code} 207 Expires in: {coupon_expires} days 208 209 {buy_now} 210 211 Don't miss out - after this, it's back to full price. 212 213 Warmly, 214 The {site_name} Team" 215 ); 216 217 $first_followup_content = restaler()->templates->get_template( 218 'email/email-content.php', 219 array( 220 'heading' => $first_follow_up_heading, 221 'content' => $first_follow_up_content['html'], 222 'footer_text' => $first_follow_up_footer_text, 223 ) 224 ); 225 226 // CssInliner loads from WooCommerce. 227 $first_followup_html = CssInliner::fromHtml( $first_followup_content )->inlineCss()->render(); 228 229 $second_followup_content = restaler()->templates->get_template( 230 'email/email-content.php', 231 array( 232 'heading' => $second_follow_up_heading, 233 'content' => $second_follow_up_content['html'], 234 'footer_text' => $second_follow_up_footer_text, 235 ) 236 ); 237 238 // CssInliner loads from WooCommerce. 239 $second_followup_html = CssInliner::fromHtml( $second_followup_content )->inlineCss()->render(); 240 241 $sequence_id = restaler()->emailer->create_followup_sequence( 242 $row['email'], 243 array( 244 array( 245 'days' => $first_followup, 246 'subject' => $first_follow_up_subject, 247 'message' => $first_followup_html, 248 ), 249 array( 250 'days' => $second_followup, 251 'subject' => $second_follow_up_subject, 252 'message' => $second_followup_html, 253 ), 254 ), 255 array( 256 'product' => $product, 257 'coupon' => $coupon, 258 'discount_type' => $discount_type, 259 'amount' => $amount, 260 'coupon_expires_in' => $coupon_expires_in, 261 ) 262 ); 98 263 } 99 264 } -
restock-alerts-for-woocommerce/trunk/common/public/class-frontend.php
r3368780 r3369775 213 213 $content = get_option( 214 214 'restaler_verification_email_content', 215 array( 216 'html' => "Hi{customer_name}, 215 "Hi {customer_name}, 217 216 218 217 Thanks for signing up. Please confirm your email address by clicking the button below: … … 227 226 228 227 Warmly, 229 The {site_name} Team", 230 ) 228 The {site_name} Team" 231 229 ); 232 230 … … 254 252 255 253 if ( Core_Utils::string_to_bool( $enable_stock_threshold ) ) { 256 257 254 $stock_quantity = $product->get_stock_quantity(); 258 255 259 if ( $stock_quantity && $stock_quantity<= $stock_threshold_count ) {256 if ( $stock_quantity <= $stock_threshold_count ) { 260 257 return true; 261 258 } -
restock-alerts-for-woocommerce/trunk/core/assets/css/admin.css
r3368780 r3369775 110 110 box-shadow: none; 111 111 width: 100%; 112 } 113 114 .stobokit-wrapper .tablenav { 115 height: 40px; 116 margin: 12px 0; 117 padding-top: 0; 112 118 } 113 119 -
restock-alerts-for-woocommerce/trunk/core/class-emailer.php
r3368780 r3369775 178 178 */ 179 179 public function send_later( $to, $subject, $message, $days_later, $args = array(), $name = '', $validation_callback = null ) { 180 $base_time = time();181 $send_time = $base_time + ( 1 * MINUTE_IN_SECONDS );180 $base_time = time(); 181 $send_time = $base_time + ( $days_later * DAY_IN_SECONDS ); 182 182 $email_id = 'email_' . Utils::uid(); 183 183 … … 238 238 239 239 foreach ( $sequence as $index => $email ) { 240 $send_time = $base_time + ( ( $index + 1 ) * 2 * MINUTE_IN_SECONDS );240 $send_time = $base_time + ( $email['days'] * DAY_IN_SECONDS ); 241 241 242 242 // Check if individual email has a uid - if so, cancel that specific email. -
restock-alerts-for-woocommerce/trunk/core/class-list-table.php
r3368780 r3369775 3 3 * Table holds all the notify details. 4 4 * 5 * Usage Examples: 6 * ============== 7 * // Basic filter for active status 8 * add_filter( '{table_id}_table_where_clause_filter', 'filter_active_items_only', 10, 1 ); 9 * function filter_active_items_only( $filter_data ) { 10 * // Only show active items 11 * $filter_data['conditions'][] = array( 12 * 'sql' => '`status` = %s', 13 * 'params' => array( 'active' ) 14 * ); 15 * 16 * return $filter_data; 17 * } 18 * 19 * // Date range filter 20 * add_filter( '{table_id}_table_where_clause_filter', 'filter_by_date_range', 10, 1 ); 21 * function filter_by_date_range( $filter_data ) { 22 * // Filter items created in the last 30 days 23 * $filter_data['conditions'][] = array( 24 * 'sql' => '`created_date` >= %s', 25 * 'params' => array( date( 'Y-m-d', strtotime( '-30 days' ) ) ) 26 * ); 27 * 28 * return $filter_data; 29 * } 30 * 31 * @package restock-alerts-for-woocommerce\core\ 5 * @package plugin-slug\core\ 32 6 * @author Store Boost Kit <storeboostkit@gmail.com> 33 7 * @version 1.0 … … 119 93 array( 120 94 'cb' => '<input type="checkbox" />', 121 'id' => esc_html__( 'ID', ' restock-alerts-for-woocommerce' ),95 'id' => esc_html__( 'ID', 'plugin-slug' ), 122 96 ) 123 97 ); … … 163 137 $this->id . '_table_bulk_actions', 164 138 array( 165 'delete' => esc_html__( 'Delete permanently', ' restock-alerts-for-woocommerce' ),139 'delete' => esc_html__( 'Delete permanently', 'plugin-slug' ), 166 140 ) 167 141 ); … … 269 243 if ( ! empty( $search_conditions ) ) { 270 244 $where_conditions[] = '(' . implode( ' OR ', $search_conditions ) . ')'; 271 }272 }273 }274 275 // Apply custom filter with validation.276 $filter_data = apply_filters(277 $this->id . '_table_where_clause_filter',278 array(279 'conditions' => array(),280 'params' => array(),281 'table' => $table,282 'search' => $search,283 )284 );285 286 // Process filter conditions securely.287 if ( ! empty( $filter_data['conditions'] ) && is_array( $filter_data['conditions'] ) ) {288 foreach ( $filter_data['conditions'] as $condition ) {289 if ( $this->is_valid_filter_condition( $condition ) ) {290 $where_conditions[] = $condition['sql'];291 if ( ! empty( $condition['params'] ) ) {292 $where_params = array_merge( $where_params, $condition['params'] );293 }294 245 } 295 246 } … … 332 283 333 284 echo '<div class="alignleft actions">'; 334 echo '<a href="' . esc_url( $export_url ) . '" class="button button-secondary">' . esc_html__( 'Export All to CSV', ' restock-alerts-for-woocommerce' ) . '</a>';285 echo '<a href="' . esc_url( $export_url ) . '" class="button button-secondary">' . esc_html__( 'Export All to CSV', 'plugin-slug' ) . '</a>'; 335 286 echo '</div>'; 336 287 } 337 288 338 289 do_action( $this->id . '_table_extra_tablenav', $which ); 339 }340 341 private function is_valid_filter_condition( $condition ) {342 return is_array( $condition )343 && isset( $condition['sql'] )344 && is_string( $condition['sql'] )345 && ! empty( $condition['sql'] );346 290 } 347 291 … … 355 299 356 300 if ( ! current_user_can( 'manage_options' ) ) { 357 wp_die( esc_html__( 'You do not have permission to export data.', ' restock-alerts-for-woocommerce' ) );301 wp_die( esc_html__( 'You do not have permission to export data.', 'plugin-slug' ) ); 358 302 } 359 303 360 304 // Verify nonce. 361 305 if ( isset( $_GET['_wpnonce'] ) && ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ), $this->id . '_export_csv_nonce' ) ) { 362 wp_die( esc_html__( 'Invalid nonce.', ' restock-alerts-for-woocommerce' ) );306 wp_die( esc_html__( 'Invalid nonce.', 'plugin-slug' ) ); 363 307 } 364 308 … … 424 368 if ( ! empty( $search_conditions ) ) { 425 369 $where_conditions[] = '(' . implode( ' OR ', $search_conditions ) . ')'; 426 }427 }428 }429 430 // Apply custom filters.431 $filter_data = apply_filters(432 $this->id . '_table_where_clause_filter',433 array(434 'conditions' => array(),435 'params' => array(),436 'table' => $table,437 'search' => $search,438 )439 );440 441 if ( ! empty( $filter_data['conditions'] ) && is_array( $filter_data['conditions'] ) ) {442 foreach ( $filter_data['conditions'] as $condition ) {443 if ( $this->is_valid_filter_condition( $condition ) ) {444 $where_conditions[] = $condition['sql'];445 if ( ! empty( $condition['params'] ) ) {446 $where_params = array_merge( $where_params, $condition['params'] );447 }448 370 } 449 371 } … … 479 401 $csv_headers[] = wp_strip_all_tags( $label ); 480 402 } 481 fputcsv( $output, $csv_headers );403 fputcsv( $output, $csv_headers, ',', '"', '\\' ); 482 404 483 405 // Add data rows. … … 500 422 } 501 423 502 fputcsv( $output, $csv_row );424 fputcsv( $output, $csv_row, ',', '"', '\\' ); 503 425 } 504 426 } -
restock-alerts-for-woocommerce/trunk/readme.txt
r3368780 r3369775 34 34 This external service usage is solely for displaying informational content and does not affect the core functionality of the plugin. All communications use secure HTTPS connections. 35 35 36 == Screenshots == 36 37 37 == Screenshots ==38 38 1. General settings panel where you configure the plugin. 39 39 2. Subscription table that tracks user activity: subscribed status, purchased items, emails sent, and product/variation details. … … 49 49 50 50 If you encounter issues with the pages after an update, flush the permalinks by going to WordPress > Settings > Permalinks and hitting "Save." That should return things to normal. 51 52 == Changelog == 53 54 = 1.1.0 2025-09-29 = 55 * Add - Export feature added. 56 * Add - Follow-up email sequence added. 57 * Add - Can able to generate and send unique discount on finl follow-up email. 58 * Add - Email templates added follow-up emails. 59 * Add - Conditional tags added in email templates. 60 * Fix - Security issue resolved in notification list table. 61 62 = 1.0.0 2025-09-26 = 63 * Initial Release -
restock-alerts-for-woocommerce/trunk/restock-alerts-for-woocommerce.php
r3368780 r3369775 5 5 * Plugin URI: https://storeboostkit.com/product/restock-alerts-for-woocommerce/ 6 6 * Description: Add a Notify Me When Available button for out-of-stock items. Store owner gets the list, user gets email when back in stock. 7 * Version: 1. 0.07 * Version: 1.1.0 8 8 * Author: Store Boost Kit 9 9 * Author URI: https://storeboostkit.com/ … … 29 29 30 30 if ( ! defined( 'RESTALER_VERSION' ) ) { 31 define( 'RESTALER_VERSION', '1. 0.0' );31 define( 'RESTALER_VERSION', '1.1.0' ); 32 32 } 33 33
Note: See TracChangeset
for help on using the changeset viewer.