Plugin Directory

Changeset 3094967


Ignore:
Timestamp:
05/30/2024 06:49:05 AM (22 months ago)
Author:
jnser
Message:

Avoid sending customer adress when empty

Location:
stan-checkout/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stan-checkout/trunk/README.txt

    r3089520 r3094967  
    44Requires at least: 5.0.0
    55Tested up to: 6.5.2
    6 Stable tag: 1.2.5
     6Stable tag: 1.2.6
    77License: GPLv3 or later
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
  • stan-checkout/trunk/includes/classes/class-wc-stan-checkout-api-wrapper.php

    r3089519 r3094967  
    9090            "firstname" => $customer->get_first_name(),
    9191            "lastname" => $customer->get_last_name(),
    92             "email" => $customer->get_email(),
    93             "phone_number" => $customer->get_shipping_phone(),
    94             "address" => array(
     92            "email" => $customer->get_email()
     93        );
     94
     95        if ( ! empty( $customer->get_shipping_address_1() ) ) {
     96            $payload["phone_number"] = $customer->get_shipping_phone();
     97            $payload["address"] = array(
    9598                "firstname" => $customer->get_shipping_first_name(),
    9699                "lastname" => $customer->get_shipping_last_name(),
     
    101104                "country" => $customer->get_shipping_country(),
    102105                "region" => $customer->get_shipping_state()
    103             )
    104         );
     106            );
     107        }
    105108
    106109        try {
  • stan-checkout/trunk/wc-stan-checkout.php

    r3089520 r3094967  
    1919 * Plugin URI:        https://compte.stan-app.fr
    2020 * Description:       Vous perdez des utilisateurs lorsque vous demandez de s'inscrire, remplir les formulaires est la première raison qui mène les utilisateurs à quitter un site. Avec Stan Checkout vos utilisateurs s'inscrivent sans formulaire, sans contrainte.
    21  * Version:           1.2.5
     21 * Version:           1.2.6
    2222 * Author:            Brightweb
    2323 * Author URI:        https://stan-business.fr
Note: See TracChangeset for help on using the changeset viewer.