Created
August 25, 2016 11:48
-
-
Save nicomollet/141428d59ca6d1f5a63d414f3ffb6f0e to your computer and use it in GitHub Desktop.
Adds Payline payment mean in orders screen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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