Changeset 1658404
- Timestamp:
- 05/16/2017 12:06:43 PM (9 years ago)
- Location:
- wc-simple-waiting-list
- Files:
-
- 6 edited
- 1 copied
-
tags/1.0.4 (copied) (copied from wc-simple-waiting-list/trunk)
-
tags/1.0.4/public/class-wc-simple-waiting-list-public.php (modified) (4 diffs)
-
tags/1.0.4/readme.txt (modified) (3 diffs)
-
tags/1.0.4/wc-simple-waiting-list.php (modified) (1 diff)
-
trunk/public/class-wc-simple-waiting-list-public.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/wc-simple-waiting-list.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wc-simple-waiting-list/tags/1.0.4/public/class-wc-simple-waiting-list-public.php
r1551763 r1658404 118 118 $this->current_product = wc_get_product( $post->ID ); 119 119 120 if ( $this->current_product-> product_type== 'grouped' ) {120 if ( $this->current_product->get_type() == 'grouped' ) { 121 121 return; 122 122 } 123 123 124 if( $this->current_product-> product_type== 'variable' ){125 add_action( 'woocommerce_ stock_html', array( $this, 'wc_simple_waiting_list_box_details' ), 20, 3 );124 if( $this->current_product->get_type() == 'variable' ){ 125 add_action( 'woocommerce_get_stock_html', array( $this, 'wc_simple_waiting_list_box_details' ), 20, 3 ); 126 126 } 127 127 else { 128 add_action( 'woocommerce_ stock_html', array( $this, 'wc_simple_waiting_list_box_details' ), 20, 2 );128 add_action( 'woocommerce_get_stock_html', array( $this, 'wc_simple_waiting_list_box_details' ), 20, 2 ); 129 129 } 130 130 } … … 193 193 } 194 194 195 196 195 197 196 public function wc_simple_waiting_list_box_details($html, $availability, $_product = false ) { … … 207 206 208 207 $user = wp_get_current_user(); 209 $product_type = $_product->product_type; 210 $product_id = ( $product_type == 'simple' ) ? $_product->id : $_product->variation_id; 211 208 $product_type = $_product->get_type(); 209 $product_id = ( $product_type == 'simple' ) ? $_product->get_id() : $_product->variation_id; 212 210 $box = '<div class="wrap">'; 213 214 211 $addstyle = "display:none"; 215 212 $removestyle = "display:none"; … … 219 216 $addstyle = "display:block"; 220 217 221 $box .='<input type="submit" name="remove" id="remove" style="'. $removestyle . '" data-user-email="'. $user->user_email . '" data-product-id="'. $product_id . '" value="Leave Waiting List">'; 218 $box .='<input type="submit" name="remove" id="remove" style="'. $removestyle . '" data-user-email="'. $user->user_email . '" data-product-id="'. $product_id . '" value="Leave Waiting List">'; 222 219 if ( ! $user->exists() ) 223 220 $box .= '<input type="text" name="emailaddr" id="emailaddr" style="'. $addstyle . '" placeholder="You email address" /><br /><br />'; 224 221 $box .= '<input type="submit" name="save" id="save" style="'. $addstyle . '" data-user-email="'. $user->user_email . '" data-product-id="'. $product_id . '" value="Join Waiting List">'; 225 $box .= '</div>'; 226 echo $box; 222 $box .= '</div>'; 223 echo $box; 227 224 } 228 225 -
wc-simple-waiting-list/tags/1.0.4/readme.txt
r1551763 r1658404 4 4 Tags: ecommerce 5 5 Requires at least: 4.5 6 Tested up to: 4.7 7 Stable tag: 1.0. 36 Tested up to: 4.7.4 7 Stable tag: 1.0.4 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 10 11 A woocommerce extension to allow out of stock products to have a waiting list for registered and non-registered users.11 A woocommerce extension to allow customers to leave their email address on a waiting list for out of stock products. 12 12 13 13 == Description == 14 14 15 Allows non-registered and registered users to add their email to a waiting list for out-of-stock products. When product is back in stock, an automatic email is send to waiting list. Includes a waiting list page to list all product and the number of people on waiting list and a dashboard widget display the total number of product that have a waiting list 15 Allows customers to leave their email on a waiting list for out-of-stock products. When product is back in stock, an automatic email is send to the customers on the waiting list. 16 17 [youtube https://youtu.be/w4zklRNPwy4] 18 19 == FEATURES AND OPTIONS: == 20 Allows customers to leave their email address without having to register. 21 Dashboard widget displays the total number of products that has a waiting list. 22 Separate page to list all product and the number of people on waiting list. 23 Automatically sends an email to customers as soon as the product arrives in stock. 16 24 17 25 … … 22 30 23 31 == Frequently Asked Questions == 24 . 32 33 = How to setup? = 34 35 Just activate the plugin & you are done. 36 37 = How many waiting list can I have? = 38 39 Unlimited as many as woocommerce can support 25 40 26 41 … … 32 47 33 48 == Changelog == 49 = 1.0.4 - 22/07/2016 = 50 * fix deprecated woocommerce functions. 51 34 52 = 1.0.3 - 22/07/2016 = 35 53 * fix error cannot find email class. -
wc-simple-waiting-list/tags/1.0.4/wc-simple-waiting-list.php
r1458771 r1658404 17 17 * Plugin URI: http://imakeplugins.com/wc-simple-waiting-list/ 18 18 * Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area. 19 * Version: 1.0. 319 * Version: 1.0.4 20 20 * Author: Bob Ong 21 21 * Author URI: http://imakeplugins.com -
wc-simple-waiting-list/trunk/public/class-wc-simple-waiting-list-public.php
r1551763 r1658404 118 118 $this->current_product = wc_get_product( $post->ID ); 119 119 120 if ( $this->current_product-> product_type== 'grouped' ) {120 if ( $this->current_product->get_type() == 'grouped' ) { 121 121 return; 122 122 } 123 123 124 if( $this->current_product-> product_type== 'variable' ){125 add_action( 'woocommerce_ stock_html', array( $this, 'wc_simple_waiting_list_box_details' ), 20, 3 );124 if( $this->current_product->get_type() == 'variable' ){ 125 add_action( 'woocommerce_get_stock_html', array( $this, 'wc_simple_waiting_list_box_details' ), 20, 3 ); 126 126 } 127 127 else { 128 add_action( 'woocommerce_ stock_html', array( $this, 'wc_simple_waiting_list_box_details' ), 20, 2 );128 add_action( 'woocommerce_get_stock_html', array( $this, 'wc_simple_waiting_list_box_details' ), 20, 2 ); 129 129 } 130 130 } … … 193 193 } 194 194 195 196 195 197 196 public function wc_simple_waiting_list_box_details($html, $availability, $_product = false ) { … … 207 206 208 207 $user = wp_get_current_user(); 209 $product_type = $_product->product_type; 210 $product_id = ( $product_type == 'simple' ) ? $_product->id : $_product->variation_id; 211 208 $product_type = $_product->get_type(); 209 $product_id = ( $product_type == 'simple' ) ? $_product->get_id() : $_product->variation_id; 212 210 $box = '<div class="wrap">'; 213 214 211 $addstyle = "display:none"; 215 212 $removestyle = "display:none"; … … 219 216 $addstyle = "display:block"; 220 217 221 $box .='<input type="submit" name="remove" id="remove" style="'. $removestyle . '" data-user-email="'. $user->user_email . '" data-product-id="'. $product_id . '" value="Leave Waiting List">'; 218 $box .='<input type="submit" name="remove" id="remove" style="'. $removestyle . '" data-user-email="'. $user->user_email . '" data-product-id="'. $product_id . '" value="Leave Waiting List">'; 222 219 if ( ! $user->exists() ) 223 220 $box .= '<input type="text" name="emailaddr" id="emailaddr" style="'. $addstyle . '" placeholder="You email address" /><br /><br />'; 224 221 $box .= '<input type="submit" name="save" id="save" style="'. $addstyle . '" data-user-email="'. $user->user_email . '" data-product-id="'. $product_id . '" value="Join Waiting List">'; 225 $box .= '</div>'; 226 echo $box; 222 $box .= '</div>'; 223 echo $box; 227 224 } 228 225 -
wc-simple-waiting-list/trunk/readme.txt
r1551763 r1658404 4 4 Tags: ecommerce 5 5 Requires at least: 4.5 6 Tested up to: 4.7 7 Stable tag: 1.0. 36 Tested up to: 4.7.4 7 Stable tag: 1.0.4 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 10 11 A woocommerce extension to allow out of stock products to have a waiting list for registered and non-registered users.11 A woocommerce extension to allow customers to leave their email address on a waiting list for out of stock products. 12 12 13 13 == Description == 14 14 15 Allows non-registered and registered users to add their email to a waiting list for out-of-stock products. When product is back in stock, an automatic email is send to waiting list. Includes a waiting list page to list all product and the number of people on waiting list and a dashboard widget display the total number of product that have a waiting list 15 Allows customers to leave their email on a waiting list for out-of-stock products. When product is back in stock, an automatic email is send to the customers on the waiting list. 16 17 [youtube https://youtu.be/w4zklRNPwy4] 18 19 == FEATURES AND OPTIONS: == 20 Allows customers to leave their email address without having to register. 21 Dashboard widget displays the total number of products that has a waiting list. 22 Separate page to list all product and the number of people on waiting list. 23 Automatically sends an email to customers as soon as the product arrives in stock. 16 24 17 25 … … 22 30 23 31 == Frequently Asked Questions == 24 . 32 33 = How to setup? = 34 35 Just activate the plugin & you are done. 36 37 = How many waiting list can I have? = 38 39 Unlimited as many as woocommerce can support 25 40 26 41 … … 32 47 33 48 == Changelog == 49 = 1.0.4 - 22/07/2016 = 50 * fix deprecated woocommerce functions. 51 34 52 = 1.0.3 - 22/07/2016 = 35 53 * fix error cannot find email class. -
wc-simple-waiting-list/trunk/wc-simple-waiting-list.php
r1458771 r1658404 17 17 * Plugin URI: http://imakeplugins.com/wc-simple-waiting-list/ 18 18 * Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area. 19 * Version: 1.0. 319 * Version: 1.0.4 20 20 * Author: Bob Ong 21 21 * Author URI: http://imakeplugins.com
Note: See TracChangeset
for help on using the changeset viewer.