Plugin Directory

Changeset 1943331


Ignore:
Timestamp:
09/18/2018 11:42:58 PM (7 years ago)
Author:
referralcandy
Message:

fixed issue where orders with no names produce checksum errors

Location:
referralcandy-for-woocommerce/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • referralcandy-for-woocommerce/trunk/includes/class-wc-referralcandy-integration.php

    r1889063 r1943331  
    101101            $order_number       = $order->get_order_number();
    102102
     103            // make sure first name is always populated to avoid checksum errors
     104            if (empty(strip_tags($billing_first_name)) === true) { // if first name is empty
     105                // extract name from email (i.e. john from [email protected] or john_doe from [email protected])
     106                preg_match('/(?<extracted_name>\w+)/', $billing_email, $matches);
     107                $billing_first_name = $matches['extracted_name']; // assign extracted name as first name
     108            }
     109
    103110            $divData = [
    104111                'id'                => $this->is_option_enabled('popup')? 'refcandy-popsicle' : 'refcandy-mint',
    105112                'data-app-id'       => $this->get_option('app_id'),
    106                 'data-fname'        => urlencode($billing_first_name),
    107                 'data-lname'        => urlencode($billing_last_name),
     113                'data-fname'        => $billing_first_name,
     114                'data-lname'        => $billing_last_name,
    108115                'data-email'        => $this->is_option_enabled('popup')? $billing_email : $encoded_email,
    109116                'data-amount'       => $order_total,
  • referralcandy-for-woocommerce/trunk/readme.txt

    r1889063 r1943331  
    7171== Changelog ==
    7272
     73= 1.3.7 =
     74* Fixed issue where orders with spaces in the names or have no name at all produce checksum errors
     75
    7376= 1.3.6 =
    74 * Added an option to enable the post-purchase popup widget on the checkout completed / thank you page =
     77* Added an option to enable the post-purchase popup widget on the checkout completed / thank you page
    7578
    7679= 1.3.5 =
  • referralcandy-for-woocommerce/trunk/woocommerce-referralcandy.php

    r1889063 r1943331  
    77 * Author URI: http://www.referralcandy.com
    88 * Text Domain: woocommerce-referralcandy
    9  * Version: 1.3.6
     9 * Version: 1.3.7
    1010 *
    1111 * This program is free software: you can redistribute it and/or modify
Note: See TracChangeset for help on using the changeset viewer.