rollback to not calculating price
This commit is contained in:
@@ -92,13 +92,14 @@ function handle_orders_request_CIPF($request_data) {
|
||||
function create_order_CIPF() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
$paypal_api_base_url = PLGNTLS_class::get_paypal_api_base_url();
|
||||
$acf_card_price_total = PLGNTLS_class::ACF_CARD_PRICE_TOTAL;
|
||||
|
||||
$access_token = generate_access_token_CIPF();
|
||||
|
||||
$user_id = get_current_user_id();
|
||||
$acf_id = 'user_' . $user_id;
|
||||
// $price = get_field('somme_a_regler', $acf_id);
|
||||
$price = 0.01;
|
||||
$price = get_field($acf_card_price_total['_name'], $acf_id);
|
||||
// $price = 0.01;
|
||||
|
||||
$url = $paypal_api_base_url . '/v2/checkout/orders';
|
||||
$payload = array(
|
||||
|
||||
@@ -65,11 +65,11 @@ function check_can_pay_CIPF() {
|
||||
|
||||
|
||||
/*
|
||||
* ABANDONNED : bug with formbuilder
|
||||
* calculate price
|
||||
* update the price even if form builder already did it
|
||||
* in case it was changed from admin pannel
|
||||
*
|
||||
*/
|
||||
$tarif = get_acf_value_CIPF($acf_card_price_choice, $acf_id);
|
||||
$livraison = get_acf_value_CIPF($acf_card_price_delivery, $acf_id);
|
||||
if ($tarif !== null && $livraison !== null) {
|
||||
@@ -79,6 +79,7 @@ function check_can_pay_CIPF() {
|
||||
$price = 0;
|
||||
}
|
||||
update_field($acf_card_price_total['_name'], $price, $acf_id);
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user