PluginProbe
MakeCommerce for WooCommerce / 3.0.2
MakeCommerce for WooCommerce v3.0.2
4.1.0 4.0.8 trunk 1.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.0 2.2.1 2.2.2 All 96 releases
makecommerce / shipping / method / parcelmachine / dpd.php

dpd.php in MakeCommerce for WooCommerce 3.0.2, at shipping/method/parcelmachine/dpd.php

48 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace MakeCommerce\Shipping\Method\ParcelMachine;
4
5 /**
6 * DPD parcelmachine shippinh method.
7 * Defines all DPD specific options.
8 *
9 * @since 3.0.0
10 */
11
12 class DPD extends \MakeCommerce\Shipping\Method\ParcelMachine {
13
14 public $carrier = "DPD";
15 public $service_name = "DPD InterConnect";
16 public $type = "apt";
17 public $default_price = "5.00";
18 public $default_max_weight = "30";
19
20 //FI, LT, LV, SE
21 public array $valid_phonenumber_country_codes = array(
22 "358",
23 "370",
24 "371",
25 "46"
26 );
27
28 /**
29 * Loads all form fields specific to this shipping method
30 *
31 * @since 3.0.0
32 */
33 public function initialize_method_form_fields() {
34
35 //This is needed for our API. It changes behaviour depending on the country your contract has been signed in
36 $this->form_fields['service_carrier'] = array(
37 'type' => 'select',
38 'title' => __( 'Integration country', 'wc_makecommerce_domain' ),
39 'options' => array(
40 "DPD" => __( 'Estonia', 'wc_makecommerce_domain' ),
41 "DPD_LV" => __( 'Latvia', 'wc_makecommerce_domain' ),
42 "DPD_LT" => __( 'Lithuania', 'wc_makecommerce_domain' ),
43 ),
44 'default' => "ee",
45 'description' => __( "Which country's carrier gave you the credentials", 'wc_makecommerce_domain' ),
46 );
47 }
48 }