Completed
Pull Request — develop (#1505)
by Naveen
01:10
created
src/wordlift/shipping-data/class-local-pickup-shipping-method.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -6,35 +6,35 @@
 block discarded – undo
6 6
 
7 7
 class Local_Pickup_Shipping_Method extends Shipping_Method {
8 8
 
9
-	public function add_available_delivery_method( &$jsonld ) {
9
+    public function add_available_delivery_method( &$jsonld ) {
10 10
 
11
-		if ( ! isset( $jsonld['availableDeliveryMethod'] ) ) {
12
-			$jsonld['availableDeliveryMethod'] = array();
13
-		}
11
+        if ( ! isset( $jsonld['availableDeliveryMethod'] ) ) {
12
+            $jsonld['availableDeliveryMethod'] = array();
13
+        }
14 14
 
15
-		if ( ! is_array( $jsonld['availableDeliveryMethod'] ) ) {
16
-			$jsonld['availableDeliveryMethod'] = array( $jsonld['availableDeliveryMethod'] );
17
-		}
15
+        if ( ! is_array( $jsonld['availableDeliveryMethod'] ) ) {
16
+            $jsonld['availableDeliveryMethod'] = array( $jsonld['availableDeliveryMethod'] );
17
+        }
18 18
 
19
-		if ( ! in_array( 'OnSitePickup', $jsonld['availableDeliveryMethod'] ) ) {
20
-			array_push( $jsonld['availableDeliveryMethod'], 'OnSitePickup' );
21
-		}
19
+        if ( ! in_array( 'OnSitePickup', $jsonld['availableDeliveryMethod'] ) ) {
20
+            array_push( $jsonld['availableDeliveryMethod'], 'OnSitePickup' );
21
+        }
22 22
 
23
-	}
23
+    }
24 24
 
25
-	public function add_shipping_rate( &$offer_shipping_details ) {
25
+    public function add_shipping_rate( &$offer_shipping_details ) {
26 26
 
27
-		if ( ! isset( $offer_shipping_details['shippingRate'] ) ) {
28
-			$offer_shipping_details['shippingRate'] = array();
29
-		}
27
+        if ( ! isset( $offer_shipping_details['shippingRate'] ) ) {
28
+            $offer_shipping_details['shippingRate'] = array();
29
+        }
30 30
 
31
-		$offer_shipping_details['shippingRate'][] = array(
32
-			'@type'       => 'MonetaryAmount',
33
-			'name'        => $this->wc_shipping_method->get_title(),
34
-			'value'       => $this->wc_shipping_method->get_option( 'cost' ) ?: '0',
35
-			'currency'    => get_woocommerce_currency(),
36
-		);
31
+        $offer_shipping_details['shippingRate'][] = array(
32
+            '@type'       => 'MonetaryAmount',
33
+            'name'        => $this->wc_shipping_method->get_title(),
34
+            'value'       => $this->wc_shipping_method->get_option( 'cost' ) ?: '0',
35
+            'currency'    => get_woocommerce_currency(),
36
+        );
37 37
 
38
-	}
38
+    }
39 39
 
40 40
 }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,32 +6,32 @@
 block discarded – undo
6 6
 
7 7
 class Local_Pickup_Shipping_Method extends Shipping_Method {
8 8
 
9
-	public function add_available_delivery_method( &$jsonld ) {
9
+	public function add_available_delivery_method(&$jsonld) {
10 10
 
11
-		if ( ! isset( $jsonld['availableDeliveryMethod'] ) ) {
11
+		if ( ! isset($jsonld['availableDeliveryMethod'])) {
12 12
 			$jsonld['availableDeliveryMethod'] = array();
13 13
 		}
14 14
 
15
-		if ( ! is_array( $jsonld['availableDeliveryMethod'] ) ) {
16
-			$jsonld['availableDeliveryMethod'] = array( $jsonld['availableDeliveryMethod'] );
15
+		if ( ! is_array($jsonld['availableDeliveryMethod'])) {
16
+			$jsonld['availableDeliveryMethod'] = array($jsonld['availableDeliveryMethod']);
17 17
 		}
18 18
 
19
-		if ( ! in_array( 'OnSitePickup', $jsonld['availableDeliveryMethod'] ) ) {
20
-			array_push( $jsonld['availableDeliveryMethod'], 'OnSitePickup' );
19
+		if ( ! in_array('OnSitePickup', $jsonld['availableDeliveryMethod'])) {
20
+			array_push($jsonld['availableDeliveryMethod'], 'OnSitePickup');
21 21
 		}
22 22
 
23 23
 	}
24 24
 
25
-	public function add_shipping_rate( &$offer_shipping_details ) {
25
+	public function add_shipping_rate(&$offer_shipping_details) {
26 26
 
27
-		if ( ! isset( $offer_shipping_details['shippingRate'] ) ) {
27
+		if ( ! isset($offer_shipping_details['shippingRate'])) {
28 28
 			$offer_shipping_details['shippingRate'] = array();
29 29
 		}
30 30
 
31 31
 		$offer_shipping_details['shippingRate'][] = array(
32 32
 			'@type'       => 'MonetaryAmount',
33 33
 			'name'        => $this->wc_shipping_method->get_title(),
34
-			'value'       => $this->wc_shipping_method->get_option( 'cost' ) ?: '0',
34
+			'value'       => $this->wc_shipping_method->get_option('cost') ?: '0',
35 35
 			'currency'    => get_woocommerce_currency(),
36 36
 		);
37 37
 
Please login to merge, or discard this patch.
src/wordlift/shipping-data/class-flat-rate-shipping-method.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -6,35 +6,35 @@
 block discarded – undo
6 6
 
7 7
 class Flat_Rate_Shipping_Method extends Shipping_Method {
8 8
 
9
-	public function add_available_delivery_method( &$jsonld ) {
9
+    public function add_available_delivery_method( &$jsonld ) {
10 10
 
11
-		if ( ! isset( $jsonld['availableDeliveryMethod'] ) ) {
12
-			$jsonld['availableDeliveryMethod'] = array();
13
-		}
11
+        if ( ! isset( $jsonld['availableDeliveryMethod'] ) ) {
12
+            $jsonld['availableDeliveryMethod'] = array();
13
+        }
14 14
 
15
-		if ( ! is_array( $jsonld['availableDeliveryMethod'] ) ) {
16
-			$jsonld['availableDeliveryMethod'] = array( $jsonld['availableDeliveryMethod'] );
17
-		}
15
+        if ( ! is_array( $jsonld['availableDeliveryMethod'] ) ) {
16
+            $jsonld['availableDeliveryMethod'] = array( $jsonld['availableDeliveryMethod'] );
17
+        }
18 18
 
19
-		if ( ! in_array( 'ParcelDelivery', $jsonld['availableDeliveryMethod'] ) ) {
20
-			array_push( $jsonld['availableDeliveryMethod'], 'ParcelDelivery' );
21
-		}
19
+        if ( ! in_array( 'ParcelDelivery', $jsonld['availableDeliveryMethod'] ) ) {
20
+            array_push( $jsonld['availableDeliveryMethod'], 'ParcelDelivery' );
21
+        }
22 22
 
23
-	}
23
+    }
24 24
 
25
-	public function add_shipping_rate( &$offer_shipping_details ) {
25
+    public function add_shipping_rate( &$offer_shipping_details ) {
26 26
 
27
-		if ( ! isset( $offer_shipping_details['shippingRate'] ) ) {
28
-			$offer_shipping_details['shippingRate'] = array();
29
-		}
27
+        if ( ! isset( $offer_shipping_details['shippingRate'] ) ) {
28
+            $offer_shipping_details['shippingRate'] = array();
29
+        }
30 30
 
31
-		$offer_shipping_details['shippingRate'][] = array(
32
-			'@type'       => 'MonetaryAmount',
33
-			'name'        => $this->wc_shipping_method->get_title(),
34
-			'value'       => $this->wc_shipping_method->get_option( 'cost' ),
35
-			'currency'    => get_woocommerce_currency(),
36
-		);
31
+        $offer_shipping_details['shippingRate'][] = array(
32
+            '@type'       => 'MonetaryAmount',
33
+            'name'        => $this->wc_shipping_method->get_title(),
34
+            'value'       => $this->wc_shipping_method->get_option( 'cost' ),
35
+            'currency'    => get_woocommerce_currency(),
36
+        );
37 37
 
38
-	}
38
+    }
39 39
 
40 40
 }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,32 +6,32 @@
 block discarded – undo
6 6
 
7 7
 class Flat_Rate_Shipping_Method extends Shipping_Method {
8 8
 
9
-	public function add_available_delivery_method( &$jsonld ) {
9
+	public function add_available_delivery_method(&$jsonld) {
10 10
 
11
-		if ( ! isset( $jsonld['availableDeliveryMethod'] ) ) {
11
+		if ( ! isset($jsonld['availableDeliveryMethod'])) {
12 12
 			$jsonld['availableDeliveryMethod'] = array();
13 13
 		}
14 14
 
15
-		if ( ! is_array( $jsonld['availableDeliveryMethod'] ) ) {
16
-			$jsonld['availableDeliveryMethod'] = array( $jsonld['availableDeliveryMethod'] );
15
+		if ( ! is_array($jsonld['availableDeliveryMethod'])) {
16
+			$jsonld['availableDeliveryMethod'] = array($jsonld['availableDeliveryMethod']);
17 17
 		}
18 18
 
19
-		if ( ! in_array( 'ParcelDelivery', $jsonld['availableDeliveryMethod'] ) ) {
20
-			array_push( $jsonld['availableDeliveryMethod'], 'ParcelDelivery' );
19
+		if ( ! in_array('ParcelDelivery', $jsonld['availableDeliveryMethod'])) {
20
+			array_push($jsonld['availableDeliveryMethod'], 'ParcelDelivery');
21 21
 		}
22 22
 
23 23
 	}
24 24
 
25
-	public function add_shipping_rate( &$offer_shipping_details ) {
25
+	public function add_shipping_rate(&$offer_shipping_details) {
26 26
 
27
-		if ( ! isset( $offer_shipping_details['shippingRate'] ) ) {
27
+		if ( ! isset($offer_shipping_details['shippingRate'])) {
28 28
 			$offer_shipping_details['shippingRate'] = array();
29 29
 		}
30 30
 
31 31
 		$offer_shipping_details['shippingRate'][] = array(
32 32
 			'@type'       => 'MonetaryAmount',
33 33
 			'name'        => $this->wc_shipping_method->get_title(),
34
-			'value'       => $this->wc_shipping_method->get_option( 'cost' ),
34
+			'value'       => $this->wc_shipping_method->get_option('cost'),
35 35
 			'currency'    => get_woocommerce_currency(),
36 36
 		);
37 37
 
Please login to merge, or discard this patch.
src/wordlift/shipping-data/class-free-shipping-shipping-method.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -6,36 +6,36 @@
 block discarded – undo
6 6
 
7 7
 class Free_Shipping_Shipping_Method extends Shipping_Method {
8 8
 
9
-	public function add_available_delivery_method( &$jsonld ) {
9
+    public function add_available_delivery_method( &$jsonld ) {
10 10
 
11
-		if ( ! isset( $jsonld['availableDeliveryMethod'] ) ) {
12
-			$jsonld['availableDeliveryMethod'] = array();
13
-		}
11
+        if ( ! isset( $jsonld['availableDeliveryMethod'] ) ) {
12
+            $jsonld['availableDeliveryMethod'] = array();
13
+        }
14 14
 
15
-		if ( ! is_array( $jsonld['availableDeliveryMethod'] ) ) {
16
-			$jsonld['availableDeliveryMethod'] = array( $jsonld['availableDeliveryMethod'] );
17
-		}
15
+        if ( ! is_array( $jsonld['availableDeliveryMethod'] ) ) {
16
+            $jsonld['availableDeliveryMethod'] = array( $jsonld['availableDeliveryMethod'] );
17
+        }
18 18
 
19
-		if ( ! in_array( 'ParcelDelivery', $jsonld['availableDeliveryMethod'] ) ) {
20
-			array_push( $jsonld['availableDeliveryMethod'], 'ParcelDelivery' );
21
-		}
19
+        if ( ! in_array( 'ParcelDelivery', $jsonld['availableDeliveryMethod'] ) ) {
20
+            array_push( $jsonld['availableDeliveryMethod'], 'ParcelDelivery' );
21
+        }
22 22
 
23
-	}
23
+    }
24 24
 
25
-	public function add_shipping_rate( &$offer_shipping_details ) {
25
+    public function add_shipping_rate( &$offer_shipping_details ) {
26 26
 
27
-		if ( ! isset( $offer_shipping_details['shippingRate'] ) ) {
28
-			$offer_shipping_details['shippingRate'] = array();
29
-		}
27
+        if ( ! isset( $offer_shipping_details['shippingRate'] ) ) {
28
+            $offer_shipping_details['shippingRate'] = array();
29
+        }
30 30
 
31
-		$offer_shipping_details['shippingRate'][] = array(
32
-			'@type'       => 'MonetaryAmount',
33
-			'name'        => $this->wc_shipping_method->get_title(),
34
-			'value'       => '0',
35
-			'currency'    => get_woocommerce_currency(),
36
-		);
31
+        $offer_shipping_details['shippingRate'][] = array(
32
+            '@type'       => 'MonetaryAmount',
33
+            'name'        => $this->wc_shipping_method->get_title(),
34
+            'value'       => '0',
35
+            'currency'    => get_woocommerce_currency(),
36
+        );
37 37
 
38
-	}
38
+    }
39 39
 
40 40
 
41 41
 }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,25 +6,25 @@
 block discarded – undo
6 6
 
7 7
 class Free_Shipping_Shipping_Method extends Shipping_Method {
8 8
 
9
-	public function add_available_delivery_method( &$jsonld ) {
9
+	public function add_available_delivery_method(&$jsonld) {
10 10
 
11
-		if ( ! isset( $jsonld['availableDeliveryMethod'] ) ) {
11
+		if ( ! isset($jsonld['availableDeliveryMethod'])) {
12 12
 			$jsonld['availableDeliveryMethod'] = array();
13 13
 		}
14 14
 
15
-		if ( ! is_array( $jsonld['availableDeliveryMethod'] ) ) {
16
-			$jsonld['availableDeliveryMethod'] = array( $jsonld['availableDeliveryMethod'] );
15
+		if ( ! is_array($jsonld['availableDeliveryMethod'])) {
16
+			$jsonld['availableDeliveryMethod'] = array($jsonld['availableDeliveryMethod']);
17 17
 		}
18 18
 
19
-		if ( ! in_array( 'ParcelDelivery', $jsonld['availableDeliveryMethod'] ) ) {
20
-			array_push( $jsonld['availableDeliveryMethod'], 'ParcelDelivery' );
19
+		if ( ! in_array('ParcelDelivery', $jsonld['availableDeliveryMethod'])) {
20
+			array_push($jsonld['availableDeliveryMethod'], 'ParcelDelivery');
21 21
 		}
22 22
 
23 23
 	}
24 24
 
25
-	public function add_shipping_rate( &$offer_shipping_details ) {
25
+	public function add_shipping_rate(&$offer_shipping_details) {
26 26
 
27
-		if ( ! isset( $offer_shipping_details['shippingRate'] ) ) {
27
+		if ( ! isset($offer_shipping_details['shippingRate'])) {
28 28
 			$offer_shipping_details['shippingRate'] = array();
29 29
 		}
30 30
 
Please login to merge, or discard this patch.