Skip to content

Commit

Permalink
v1.0.3 released.
Browse files Browse the repository at this point in the history
- At_the_Sorting_HUB option added.
  • Loading branch information
Ok9xNirab committed Sep 28, 2023
1 parent 815326c commit aba315c
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions includes/Illuminate/class-pathao-method.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,45 +73,38 @@ public function init_form_fields() {
$this->update_option( 'area_field', 'display_required' );
$this->update_option( 'delivery_type', 48 );
$this->update_option( 'default_weight', 0.5 );
$this->update_option( 'at_the_sorting_hub_status', 'wc-in-shipment' );
$this->update_option( 'pickup_failed_status', 'wc-processing' );
$this->update_option( 'delivered_status', 'wc-completed' );
$this->update_option( 'return_status', 'wc-processing' );
$this->update_option( 'on_hold_status', 'wc-on-hold' );
}

$this->form_fields = array(
'enabled' => array(
'enabled' => array(
'title' => __( 'Enable', 'sdevs_pathao' ),
'type' => 'checkbox',
'description' => __( 'Enable this shipping.', 'sdevs_pathao' ),
'default' => is_sdevs_pathao_pro_activated() ? 'yes' : 'no',
'disabled' => ! is_sdevs_pathao_pro_activated(),
),
'title' => array(
'title' => array(
'title' => __( 'Title', 'sdevs_pathao' ),
'type' => 'text',
'description' => __( 'Title to be display on site', 'sdevs_pathao' ),
'default' => 'Pathao',
'disabled' => ! is_sdevs_pathao_pro_activated(),
'required' => true,
),
'store' => array(
'store' => array(
'title' => __( 'Store', 'sdevs_pathao' ),
'type' => 'select',
'class' => 'wc-enhanced-select',
'options' => $dropdown_stores,
'disabled' => count( $dropdown_stores ) === 0,
'description' => count( $dropdown_stores ) === 0 ? __( 'Please generate token at first !', 'sdevs_pathao' ) : null,
),
// 'replace_checkout_fields' => array(
// 'title' => __('Replace Checkout Fields', 'sdevs_pathao'),
// 'type' => 'checkbox',
// 'class' => array('input-checkbox'),
// 'label' => sprintf(__('Display %sCity, Zone, Area%s fields & Hide default %sTown / City, District, Postcode / ZIP%s fields in Checkout.', 'sdevs_pathao_pro'), '<b>', '</b>', '<b>', '</b>'),
// 'default' => 'yes',
// 'disabled' => !is_sdevs_pathao_pro_activated()
// ),
'area_field' => array(
'area_field' => array(
'title' => __( 'Area Field', 'sdevs_pathao' ),
'type' => 'select',
'options' => array(
Expand All @@ -122,7 +115,7 @@ public function init_form_fields() {
'default' => 'display_required',
'disabled' => ! is_sdevs_pathao_pro_activated(),
),
'delivery_type' => array(
'delivery_type' => array(
'title' => __( 'Delivery Type', 'sdevs_pathao' ),
'type' => 'select',
'options' => array(
Expand All @@ -132,7 +125,7 @@ public function init_form_fields() {
'default' => 48,
'disabled' => ! is_sdevs_pathao_pro_activated(),
),
'default_weight' => array(
'default_weight' => array(
'title' => __( 'Default Item Weight (KG)', 'sdevs_pathao' ),
'type' => 'number',
'custom_attributes' => array(
Expand All @@ -145,31 +138,39 @@ public function init_form_fields() {
'default' => 0.5,
'disabled' => ! is_sdevs_pathao_pro_activated(),
),
'pickup_failed_status' => array(
'at_the_sorting_hub_status' => array(
'title' => __( 'Order Status For At the Sorting HUB', 'sdevs_pathao' ),
'type' => 'select',
'options' => $order_statuses,
'description' => __( 'When Pathao order status is At the Sorting HUB, WooCommerce Order status will be set this status !', 'sdevs_pathao' ),
'default' => 'wc-in-shipment',
'disabled' => ! is_sdevs_pathao_pro_activated(),
),
'pickup_failed_status' => array(
'title' => __( 'Order Status For Pickup Failed', 'sdevs_pathao' ),
'type' => 'select',
'options' => $order_statuses,
'description' => __( 'When Pathao order status is Pickup Failed, WooCommerce Order status will be set this status !', 'sdevs_pathao' ),
'default' => 'wc-processing',
'disabled' => ! is_sdevs_pathao_pro_activated(),
),
'delivered_status' => array(
'delivered_status' => array(
'title' => __( 'Order Status For Delivered', 'sdevs_pathao' ),
'type' => 'select',
'options' => $order_statuses,
'description' => __( 'When Pathao order status is Delivered, WooCommerce Order status will be set this status !', 'sdevs_pathao' ),
'default' => 'wc-completed',
'disabled' => ! is_sdevs_pathao_pro_activated(),
),
'return_status' => array(
'return_status' => array(
'title' => __( 'Order Status For Return', 'sdevs_pathao' ),
'type' => 'select',
'options' => $order_statuses,
'description' => __( 'When Pathao order status is Return, WooCommerce Order status will be set this status !', 'sdevs_pathao' ),
'default' => 'wc-processing',
'disabled' => ! is_sdevs_pathao_pro_activated(),
),
'on_hold_status' => array(
'on_hold_status' => array(
'title' => __( 'Order Status For On_Hold', 'sdevs_pathao' ),
'type' => 'select',
'options' => $order_statuses,
Expand Down

0 comments on commit aba315c

Please sign in to comment.