# makecommerce/3.0.9/shipping/method/common/dpd.php

MakeCommerce for WooCommerce, version 3.0.9. 38 lines.

- Page: https://pluginprobe.com/plugins/makecommerce/3.0.9/code/shipping/method/common/dpd.php
- Raw: https://pluginprobe.com/plugins/makecommerce/3.0.9/raw/shipping/method/common/dpd.php
- Modified: 2021-06-17T08:47:30+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/makecommerce/3.0.9/code/shipping/method/common/dpd.php#L10-L20`.

```php
<?php

namespace MakeCommerce\Shipping\Method\Common;

/**
 * Omniva specific functionality that is used by both courier and parcelmachine
 * 
 * @since 3.0.4
 */

trait DPD {

    public $carrier = "DPD";
    public $service_name = "DPD InterConnect";
    public $international_number_format = true;

    /**
     * https://www.dpd.com/ee/wp-content/uploads/sites/235/2020/04/Interconnector_dokumentatsioon-1.pdf
     * 
     * Recipient phone number, must start with international
     * country code. e.g. +372555555, +37065123456
     * 
     * country code => array(
     *      starting number(s) => array( lenght1, lenght2 )
     * )
     */
    //DPD does not define any restrictions on phone numbers. Leave $valid_phonenumber_country_codes undefined

    /**
     * Returns invalid phone number error
     * 
     * @since 3.0.4
     */
    public function phone_number_validation_error() {
        return '<strong>' . $this->carrier . '</strong> ' . __(' can be used with an international phone number only. Please specify your phone number with international access code (e.g. +372xxxxxxx)', 'wc_makecommerce_domain' );
    }
}

```
