Plugin Directory

Changeset 2130589


Ignore:
Timestamp:
07/30/2019 06:06:07 AM (7 years ago)
Author:
artdevstudios1
Message:

update function name

Location:
woo-email-subscribe/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • woo-email-subscribe/trunk/assets/js/scripts.js

    r2126013 r2130589  
    2727                 type : "post",             
    2828                 url : myAjax.ajaxurl,               
    29                  data : {action: "wc_email_subcribe_function",subc_email:subc_email },
     29                 data : {action: "wpwes_email_subcribe_function",subc_email:subc_email },
    3030                 success: function(response) {
    3131                     
  • woo-email-subscribe/trunk/init/price-discount-class.php

    r2126013 r2130589  
    66*/
    77
    8 class woo_email_subscribe{
     8class Wpwes_Email_Subscribe{
    99
    1010      public function __construct(){
     
    2222       
    2323        // 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 );
    2525        add_filter( 'woocommerce_cart_item_price', array( $this, 'wpwes_change_cart_table_price_display' ), 30, 3 );
    2626       
     
    6565     
    6666   
    67     public function set_cart_item_sale_price( $cart ) {
     67    public function wpwes_set_cart_item_sale_price( $cart ) {
    6868        if ( is_admin() && ! defined( 'DOING_AJAX' ) )
    6969            return;
     
    8888}
    8989
    90 new woo_email_subscribe();
     90new Wpwes_Email_Subscribe();
  • woo-email-subscribe/trunk/readme.text

    r2128430 r2130589  
    55Requires at least: 4.4
    66Tested up to: 5.2
    7 Stable tag: 2.2.1
     7Stable tag: 1.1.0
    88Requires PHP: 5.2
    99License: GPLv2 or later
     
    1414
    1515== 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!
    1717== Installation ==
    1818
     
    2525
    2626= 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.
     271. Upload the plugin files to the '/wp-content/plugins/woo-email-subscribe' directory, or install the plugin through the WordPress plugins screen directly.
    28282. Activate the plugin through the \'Plugins\' screen in WordPress.
    2929
     
    3939
    4040== Changelog ==
    41 
    4241For more information,please readfull description
    4342
    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.
    4645
    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  
    2525$jal_db_version = '1.0';
    2626
    27 function wc_email_subcribe_install() {
     27function wpwes_email_subcribe_install() {
     28   
    2829    global $wpdb;
    2930    global $jal_db_version;
     
    4647}
    4748
    48 register_activation_hook( __FILE__, 'wc_email_subcribe_install' );
     49register_activation_hook( __FILE__, 'wpwes_email_subcribe_install' );
    4950 
    5051
    5152
    52  function add_theme_scripts() {
     53 function wpwes_add_scripts() {
    5354 
    5455   
     
    5859   
    5960}
    60 add_action( 'wp_enqueue_scripts', 'add_theme_scripts' );
     61add_action( 'wp_enqueue_scripts', 'wpwes_add_scripts' );
    6162 
    62 add_action( 'woocommerce_before_add_to_cart_quantity', 'wc_email_subscribe_html' );
     63add_action( 'woocommerce_before_add_to_cart_quantity', 'wpwes_email_subscribe_html' );
    6364
    6465
    65 function get_email_status( $post_email   ){
     66function wpwes_get_email_status( $post_email   ){
    6667   
    6768     global $wpdb;
     
    8687
    8788
    88 function wc_email_subscribe_html() {
     89function wpwes_email_subscribe_html() {
    8990   
    9091   
    91     if( empty( get_email_status( $_COOKIE['user_email']  ) ) ){
     92    if( empty( wpwes_get_email_status( $_COOKIE['user_email']  ) ) ){
    9293         ?>
    9394            <div class="form-group">           
     
    104105}
    105106
    106 add_action("wp_ajax_wc_email_subcribe_function", "wc_email_subcribe_function");
    107 add_action("wp_ajax_nopriv_wc_email_subcribe_function", "wc_email_subcribe_function");
     107add_action("wp_ajax_wpwes_email_subcribe_function", "wpwes_email_subcribe_function");
     108add_action("wp_ajax_nopriv_wpwes_email_subcribe_function", "wpwes_email_subcribe_function");
    108109
    109 function wc_email_subcribe_function(){
     110function wpwes_email_subcribe_function(){
    110111   
    111112     $post_email = sanitize_email( $_POST["subc_email"] );
Note: See TracChangeset for help on using the changeset viewer.