Changeset 2130589
- Timestamp:
- 07/30/2019 06:06:07 AM (7 years ago)
- Location:
- woo-email-subscribe/trunk
- Files:
-
- 4 edited
-
assets/js/scripts.js (modified) (1 diff)
-
init/price-discount-class.php (modified) (4 diffs)
-
readme.text (modified) (4 diffs)
-
woocommerce-subscribe.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-email-subscribe/trunk/assets/js/scripts.js
r2126013 r2130589 27 27 type : "post", 28 28 url : myAjax.ajaxurl, 29 data : {action: "w c_email_subcribe_function",subc_email:subc_email },29 data : {action: "wpwes_email_subcribe_function",subc_email:subc_email }, 30 30 success: function(response) { 31 31 -
woo-email-subscribe/trunk/init/price-discount-class.php
r2126013 r2130589 6 6 */ 7 7 8 class woo_email_subscribe{8 class Wpwes_Email_Subscribe{ 9 9 10 10 public function __construct(){ … … 22 22 23 23 // Calculating Total on the cart page 24 add_action( 'woocommerce_before_calculate_totals', array( $this, ' set_cart_item_sale_price' ), 10, 1 );24 add_action( 'woocommerce_before_calculate_totals', array( $this, 'wpwes_set_cart_item_sale_price' ), 10, 1 ); 25 25 add_filter( 'woocommerce_cart_item_price', array( $this, 'wpwes_change_cart_table_price_display' ), 30, 3 ); 26 26 … … 65 65 66 66 67 public function set_cart_item_sale_price( $cart ) {67 public function wpwes_set_cart_item_sale_price( $cart ) { 68 68 if ( is_admin() && ! defined( 'DOING_AJAX' ) ) 69 69 return; … … 88 88 } 89 89 90 new woo_email_subscribe();90 new Wpwes_Email_Subscribe(); -
woo-email-subscribe/trunk/readme.text
r2128430 r2130589 5 5 Requires at least: 4.4 6 6 Tested up to: 5.2 7 Stable tag: 2.2.17 Stable tag: 1.1.0 8 8 Requires PHP: 5.2 9 9 License: GPLv2 or later … … 14 14 15 15 == Description == 16 This plugin is used in WooCommerce as an instant solution to provide a discount on subscribing to your website's email. The window and amount of the discount can be easily modified in the back-end. This plugin can be used to add that extra edge to your user-experience by giving them a prompt discount benefit. Add this to your website and get ahead!16 * This plugin is used in WooCommerce as an instant solution to provide a discount on subscribing to your website's email. The window and amount of the discount can be easily modified in the back-end. This plugin can be used to add that extra edge to your user-experience by giving them a prompt discount benefit. Add this to your website and get ahead! 17 17 == Installation == 18 18 … … 25 25 26 26 = Manual installation = 27 1. Upload the plugin files to the `/wp-content/plugins/woo-email-subscribe`directory, or install the plugin through the WordPress plugins screen directly.27 1. Upload the plugin files to the '/wp-content/plugins/woo-email-subscribe' directory, or install the plugin through the WordPress plugins screen directly. 28 28 2. Activate the plugin through the \'Plugins\' screen in WordPress. 29 29 … … 39 39 40 40 == Changelog == 41 42 41 For more information,please readfull description 43 42 44 = 5.1=45 * Adding the functionality for non Login user and with Browser based storage 43 = 1.1.0 = 44 * Adding the functionality for non Login user and with Browser based storage. 46 45 47 = 5.0 = 48 * Additional settings: add for woocommerce variable and simple product for getting discount. 49 50 == Upgrade Notice == 51 52 = 1.1 = 53 1.1 is a description and translation update mostly. 46 = 1.0.0 = 47 * initial upload. -
woo-email-subscribe/trunk/woocommerce-subscribe.php
r2128430 r2130589 25 25 $jal_db_version = '1.0'; 26 26 27 function wc_email_subcribe_install() { 27 function wpwes_email_subcribe_install() { 28 28 29 global $wpdb; 29 30 global $jal_db_version; … … 46 47 } 47 48 48 register_activation_hook( __FILE__, 'w c_email_subcribe_install' );49 register_activation_hook( __FILE__, 'wpwes_email_subcribe_install' ); 49 50 50 51 51 52 52 function add_theme_scripts() {53 function wpwes_add_scripts() { 53 54 54 55 … … 58 59 59 60 } 60 add_action( 'wp_enqueue_scripts', ' add_theme_scripts' );61 add_action( 'wp_enqueue_scripts', 'wpwes_add_scripts' ); 61 62 62 add_action( 'woocommerce_before_add_to_cart_quantity', 'w c_email_subscribe_html' );63 add_action( 'woocommerce_before_add_to_cart_quantity', 'wpwes_email_subscribe_html' ); 63 64 64 65 65 function get_email_status( $post_email ){66 function wpwes_get_email_status( $post_email ){ 66 67 67 68 global $wpdb; … … 86 87 87 88 88 function w c_email_subscribe_html() {89 function wpwes_email_subscribe_html() { 89 90 90 91 91 if( empty( get_email_status( $_COOKIE['user_email'] ) ) ){92 if( empty( wpwes_get_email_status( $_COOKIE['user_email'] ) ) ){ 92 93 ?> 93 94 <div class="form-group"> … … 104 105 } 105 106 106 add_action("wp_ajax_w c_email_subcribe_function", "wc_email_subcribe_function");107 add_action("wp_ajax_nopriv_w c_email_subcribe_function", "wc_email_subcribe_function");107 add_action("wp_ajax_wpwes_email_subcribe_function", "wpwes_email_subcribe_function"); 108 add_action("wp_ajax_nopriv_wpwes_email_subcribe_function", "wpwes_email_subcribe_function"); 108 109 109 function w c_email_subcribe_function(){110 function wpwes_email_subcribe_function(){ 110 111 111 112 $post_email = sanitize_email( $_POST["subc_email"] );
Note: See TracChangeset
for help on using the changeset viewer.