Custom value with PHP | WordPress.org

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();
}

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer