WooCommerce ELTA Courier Voucher

Usefull filters


In the example below we set a maximum weight of 2 kg if it is over 2, otherwise it will take the weight which automatically calculated by the products

function myweight($weight){
if ($weight > 2){
    $newweight = 2;
    $newweight = $weight;

return $newweight;

add_filter( 'iben_elta_filter_weight_order_metabox', 'myweight' );

Tel 2 ή mobile in custom field

If you have an extra custom field in checkout to get customer mobile and the meta name is _billing_mobile you’re ready. 

Otherwise you should run the following code in your child functions.php and just change the name _billing_mobile to your own meta name. 

The dash ( _ ) is required.

function mycustomphonefield(){

     return '_billing_mobile';

add_filter( 'iben_elta_filter_phone2_metafield_order_metabox', 'mycustomphonefield' );

Other filters


For voucher comments

COD of voucher