• Resolved pipoulito

    (@pipoulito)


    Hello

    i need to create a custom column with a custom value returned by a custom PHP function.
    If i pu my code in your PHP field area, will it work ?
    thanks

    function get_total_installment_to_order( $order_id ){
    $order    = wc_get_order( $order_id );
    if ( ! $order ) {
    return 0;
    }
    $payment_id = $order->get_meta( ‘_sumo_pp_payment_id’, true );
    if ( ! $payment_id ) {
    return 0;
    }
    $payment = _sumo_pp_get_payment( payment_id );
    if ( ! $payment ) {
    return 0;
    }
    return $payment->get_total_installments();
    }

Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Custom value with PHP’ is closed to new replies.