Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

add_action( 'woocommerce_admin_order_actions', 'add_content_to_wcactions_column');

function add_content_to_wcactions_column() {

global $the_order;

if( $email = $the_order->get_billing_email() ){


$id = $the_order->get_id();
$date = $the_order->get_date_created();
$name = $the_order->get_billing_first_name();
$total = $the_order->get_total();

$shippingfirstname = $the_order->get_shipping_first_name();
$shippingsecondname = $the_order->get_shipping_last_name();

$address1 = $the_order->get_shipping_address_1();
$address2 = $the_order->get_shipping_address_2();
$postcode = $the_order->get_shipping_postcode();
$shippingcity = $the_order->get_shipping_city();
$shippingstate = $the_order->get_shipping_state();
$shippingcountry = $the_order->get_shipping_country();

$currency = $the_order->get_currency();

$status = $the_order->get_status();

echo '<a class="button" href="mailto:'.$email.'?subject=p&body=HY%20'.$name.',


%0AYour%20Order%20details%20are%20as%20follows%0AOrder%20ID%20:'.$id.'%0AOrder
%20Status%20:'.$status.'%0AOrder%20Total%20:'.$total.''.$currency.'%0A%0AOrder
%20Date%20:'.$date.'%0AShipping%20Address%20:'.$shippingfirstname.'%20'.
$shippingsecondname.','.$shippingstate.','.$address1.','.$address2.','.
$postcode.','.$shippingcity.'">label</a>';
}
}

You might also like