PluginProbe
Sendy / trunk
Sendy vtrunk
3.4.6 3.4.7 trunk 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 All 32 releases
sendy / lib / ShippingMethods / StandardDelivery.php

StandardDelivery.php in Sendy trunk, at lib/ShippingMethods/StandardDelivery.php

35 lines 969 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Sendy\WooCommerce\ShippingMethods;
4
5 use WC_Shipping_Flat_Rate;
6
7 class StandardDelivery extends WC_Shipping_Flat_Rate
8 {
9 use ShippingMethodTrait;
10
11 public const ID = 'sendy_standard_delivery';
12
13 public function __construct($instance_id = 0)
14 {
15 $this->id = self::ID;
16 $this->instance_id = absint($instance_id);
17 $this->method_title = __('Sendy - Standard Delivery', 'sendy');
18 $this->method_description = __('Standard delivery method', 'sendy');
19
20
21 $this->supports = [
22 'shipping-zones',
23 'instance-settings',
24 'instance-settings-modal',
25 ];
26
27 $this->init();
28 $this->init_form_fields();
29 $this->init_settings();
30
31 add_filter('woocommerce_shipping_instance_form_fields_' . $this->id, [$this, 'instance_form_fields'], 10, 1);
32 add_action('woocommerce_update_options_shipping_' . $this->id, [$this, 'process_admin_options']);
33 }
34 }
35