Closed bilfeldt closed 5 years ago
This is a Nice to have feature, so let us first find out if this can be done easily.
I am not clear on this requirement, can you clarify what you mean by "capitalized edition"?
We are displaying the shipping method in the meta box as:
$shipping_method_carrier = ucfirst(SS_SHIPPING_WC()->get_shipping_method_carrier($ss_shipping_method_id));
$shipping_method_type = ucfirst(SS_SHIPPING_WC()->get_shipping_method_type($ss_shipping_method_id));
echo '<h3>' . __('Shipping Method', 'smart-send-logistics') . '</h3>';
echo '<p>' . $shipping_method_carrier . ' - ' . $shipping_method_type . '</p>';
See meta_box()
method in smart-send-logistics/includes/class-ss-shipping-wc-order.php
So an example could be that we write
<p>Postnord - Agent</p>
but it should be
<p>PostNord: Select pick-up point (MyPack Collect)</p>
which is the human readable name for the method postnord_agent
as given in the array $this->shipping_method
in smart-send-logistics/includes/class-ss-shipping-wc-method.php
Closes PR #10
Right now, then we are showing a capitalized edition of the shipping method id:
Instead, then we should take the name also used in the settings (dropdown).