Skip to content

Instantly share code, notes, and snippets.

@nicomollet
Created August 25, 2016 11:48
Show Gist options
  • Save nicomollet/141428d59ca6d1f5a63d414f3ffb6f0e to your computer and use it in GitHub Desktop.
Save nicomollet/141428d59ca6d1f5a63d414f3ffb6f0e to your computer and use it in GitHub Desktop.
Adds Payline payment mean in orders screen.
<?php
// Payline : préciser le mode de paiement dans les commandes
add_action('manage_shop_order_posts_custom_column', 'payline_payment_mean_admin_column', 10, 2);
function payline_payment_mean_admin_column($column)
{
global $post;
switch ($column) {
case 'order_total' :
$paymentmean = get_post_meta($post->ID, 'Payment mean', true);
if(!empty($paymentmean)){
echo '<small class="meta">'.$paymentmean.'</small>';
}
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment