rollback to not calculating price

This commit is contained in:
asus
2024-03-20 15:29:34 +01:00
parent b93a3298d2
commit 578502838e
4 changed files with 13 additions and 11 deletions

View File

@@ -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(

View File

@@ -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);
*/
/*