On our WooCommerce shop pewne.eu, to cover shipments, we are using Apaczka plugin that handle different shipping methods available for our customers - parcel machines included - using Apaczka provider's API.
Selected parcel machine data is populated to WooCommerce backend when you look into the order:
Unfortunately that data is not going into order confirmation e-mail.
Tried to look for any similar issues, but no joy. Also having no expertise in php doesn't help. I can see that parcel machine data shows on the checkout page in div id=selected-parcel-machine
ad on the admin end it is somehow put into div class="order_data_column"
. Unfortunately i have no idea how to make anything useful from that knowledge.
Maybe someone has been dealing with something similar already? Any help is much appreciated.
To display the delivery point (if exist) on Email notifications, use the following:
add_action('woocommerce_email_after_order_table', 'display_delivery_point_on_email_notifications', 10, 1);
function display_delivery_point_on_email_notifications( $order ) {
if ( $delivery_point = $order->get_meta('apaczka_delivery_point') ) {
echo '<style>
.delivery-point table{width: 100%; font-family: \'Helvetica Neue\', Helvetica, Roboto, Arial, sans-serif;
color: #737373; border: 1px solid #e4e4e4; margin-bottom:8px;}
.delivery-point table th, .delivery-point table td{text-align: left; border-top-width: 4px;
color: #737373; border: 1px solid #e4e4e4; padding: 12px;}
</style>';
echo '<div class="delivery-point"><h2>'.__('Delivery Point', 'woocommerce').'</h2>';
echo '<table cellspacing="0" cellpadding="6"><tbody>';
echo '<tr"><td>'.esc_attr($delivery_point['apm_access_point_id'])
. ' (' . esc_attr($delivery_point['apm_supplier']) . '. ' . esc_attr($delivery_point['apm_name']) . ')'.'</td></tr>';
echo '</tbody></table></div><br>';
}
}
Code goes in functions.php file of your child theme (or in a plugin). It should work.
Note: Found the displayed Delivery point on Admin single order in:
plugins
> apaczka-pl
> src
> Plugin.php
from line number 89 to 106.