Plugin Directory

Changeset 2185908


Ignore:
Timestamp:
11/05/2019 02:33:15 AM (6 years ago)
Author:
subscribility
Message:

Release 2.9.16

Location:
subscribility
Files:
3 edited
40 copied

Legend:

Unmodified
Added
Removed
  • subscribility/tags/2.9.16/includes/frontend/controllers/class-wp99234-users.php

    r2185331 r2185908  
    2828        add_action( 'user_register' , array( $this, 'export_user' ), 10, 1 );
    2929
    30         // Sync Customers data to Troly
     30        // Action to Sync Customers data to Troly from My Account > Billing Address or Shipping Address page
    3131        add_action( 'woocommerce_customer_save_address', array( $this, 'export_user' ), 10, 2 );
     32
     33        /**
     34         * Action to Sync Customer data to Troly from My Account > Account details page
     35         * And Customer can be update their CC Details if given.
     36         */
     37        add_action( 'woocommerce_save_account_details', array( $this, 'export_user' ), 10, 1 );
    3238
    3339        // add_action( 'show_user_profile', array( $this, 'display_extra_profile_fields' ) );
     
    446452            $user_data['customer']['notify_payments'] = '@|mail';
    447453          }
     454        }
     455
     456        /**
     457         * If Customer want's to update Credit card from Customer details page then add to payload.
     458         */
     459        if (!defined('WOOCOMMERCE_CHECKOUT') && !isset($_POST['wp99234_use_existing_card'])) {
     460            $cc_exp = explode('/', str_replace(' ', '', wp_kses($_POST['cc_exp'], array())));
     461
     462            if (count($cc_exp) > 1) {
     463                $cc_number = wp_kses($_POST['cc_number'], array());
     464                $cc_number = str_replace(' ', '', $cc_number);
     465
     466                $user_data['customer']['cc_name']      = wp_kses($_POST['cc_name'], array());
     467                $user_data['customer']['cc_number']    = $cc_number;
     468                $user_data['customer']['cc_exp_month'] = $cc_exp[0];
     469                $user_data['customer']['cc_exp_year']  = $cc_exp[1];
     470                $user_data['customer']['cc_cvv']       = wp_kses($_POST['cc_cvv'], array());
     471            }
    448472        }
    449473
  • subscribility/tags/2.9.16/readme.txt

    r2185331 r2185908  
    44Requires at least: 4.9.0
    55Tested up to: 5.2.3
    6 Stable Tag: 2.9.15
     6Stable Tag: 2.9.16
    77PHP version: 7.0 and above
    88License: GPLv2 or later
     
    7070
    7171## Changelog
     72###Version 2.9.16
     73- Fixed Customer account details to save against Troly in My Account page
     74
    7275###Version 2.9.15
    7376- Improve synchronization for Wordpress password reset token in Mailchimp
  • subscribility/tags/2.9.16/wp99234.php

    r2185331 r2185908  
    44 * Plugin URI: https://wordpress.org/plugins/subscribility/
    55 * Description: Manage and fulfil your sales of wine, beers and other crafted beverages, through clubs and other direct-to-consumer sales channels.
    6  * Version: 2.9.15
     6 * Version: 2.9.16
    77 * Author: Troly
    88 * Author URI: https://troly.io
  • subscribility/trunk/includes/frontend/controllers/class-wp99234-users.php

    r2185331 r2185908  
    2828        add_action( 'user_register' , array( $this, 'export_user' ), 10, 1 );
    2929
    30         // Sync Customers data to Troly
     30        // Action to Sync Customers data to Troly from My Account > Billing Address or Shipping Address page
    3131        add_action( 'woocommerce_customer_save_address', array( $this, 'export_user' ), 10, 2 );
     32
     33        /**
     34         * Action to Sync Customer data to Troly from My Account > Account details page
     35         * And Customer can be update their CC Details if given.
     36         */
     37        add_action( 'woocommerce_save_account_details', array( $this, 'export_user' ), 10, 1 );
    3238
    3339        // add_action( 'show_user_profile', array( $this, 'display_extra_profile_fields' ) );
     
    446452            $user_data['customer']['notify_payments'] = '@|mail';
    447453          }
     454        }
     455
     456        /**
     457         * If Customer want's to update Credit card from Customer details page then add to payload.
     458         */
     459        if (!defined('WOOCOMMERCE_CHECKOUT') && !isset($_POST['wp99234_use_existing_card'])) {
     460            $cc_exp = explode('/', str_replace(' ', '', wp_kses($_POST['cc_exp'], array())));
     461
     462            if (count($cc_exp) > 1) {
     463                $cc_number = wp_kses($_POST['cc_number'], array());
     464                $cc_number = str_replace(' ', '', $cc_number);
     465
     466                $user_data['customer']['cc_name']      = wp_kses($_POST['cc_name'], array());
     467                $user_data['customer']['cc_number']    = $cc_number;
     468                $user_data['customer']['cc_exp_month'] = $cc_exp[0];
     469                $user_data['customer']['cc_exp_year']  = $cc_exp[1];
     470                $user_data['customer']['cc_cvv']       = wp_kses($_POST['cc_cvv'], array());
     471            }
    448472        }
    449473
  • subscribility/trunk/readme.txt

    r2185331 r2185908  
    44Requires at least: 4.9.0
    55Tested up to: 5.2.3
    6 Stable Tag: 2.9.15
     6Stable Tag: 2.9.16
    77PHP version: 7.0 and above
    88License: GPLv2 or later
     
    7070
    7171## Changelog
     72###Version 2.9.16
     73- Fixed Customer account details to save against Troly in My Account page
     74
    7275###Version 2.9.15
    7376- Improve synchronization for Wordpress password reset token in Mailchimp
  • subscribility/trunk/wp99234.php

    r2185331 r2185908  
    44 * Plugin URI: https://wordpress.org/plugins/subscribility/
    55 * Description: Manage and fulfil your sales of wine, beers and other crafted beverages, through clubs and other direct-to-consumer sales channels.
    6  * Version: 2.9.15
     6 * Version: 2.9.16
    77 * Author: Troly
    88 * Author URI: https://troly.io
Note: See TracChangeset for help on using the changeset viewer.