Skip to content

Commit 2ec1989

Browse files
committed
Fixed spelling mistake for getMessage
1 parent 0757fa1 commit 2ec1989

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Traits/WooCommerceTrait.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function all($endpoint = '', $options = [])
2020

2121
return $this->client->get($endpoint, $options);
2222
} catch (\Exception $e) {
23-
throw new \Exception($e->getMessages(), 1);
23+
throw new \Exception($e->getMessage(), 1);
2424
}
2525
}
2626

@@ -40,7 +40,7 @@ public function find($endpoint = '', $options = [])
4040

4141
return $this->client->get($endpoint, $options);
4242
} catch (\Exception $e) {
43-
throw new \Exception($e->getMessages(), 1);
43+
throw new \Exception($e->getMessage(), 1);
4444
}
4545
}
4646

@@ -60,7 +60,7 @@ public function create($endpoint, $data)
6060

6161
return $this->client->post($endpoint, $data);
6262
} catch (\Exception $e) {
63-
throw new \Exception($e->getMessages(), 1);
63+
throw new \Exception($e->getMessage(), 1);
6464
}
6565
}
6666

@@ -80,7 +80,7 @@ public function update($endpoint, $data)
8080

8181
return $this->client->put($endpoint, $data);
8282
} catch (\Exception $e) {
83-
throw new \Exception($e->getMessages(), 1);
83+
throw new \Exception($e->getMessage(), 1);
8484
}
8585
}
8686

@@ -100,7 +100,7 @@ public function delete($endpoint, $options = [])
100100

101101
return $this->client->delete($endpoint, $options);
102102
} catch (\Exception $e) {
103-
throw new \Exception($e->getMessages(), 1);
103+
throw new \Exception($e->getMessage(), 1);
104104
}
105105
}
106106

@@ -114,7 +114,7 @@ public function getRequest()
114114
try {
115115
return $this->client->http->getRequest();
116116
} catch (\Exception $e) {
117-
throw new \Exception($e->getMessages(), 1);
117+
throw new \Exception($e->getMessage(), 1);
118118
}
119119
}
120120

@@ -128,7 +128,7 @@ public function getResponse()
128128
try {
129129
return $this->client->http->getResponse();
130130
} catch (\Exception $e) {
131-
throw new \Exception($e->getMessages(), 1);
131+
throw new \Exception($e->getMessage(), 1);
132132
}
133133
}
134134

src/WooCommerceApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct()
4545
]
4646
);
4747
} catch (\Exception $e) {
48-
throw new \Exception($e->getMessages(), 1);
48+
throw new \Exception($e->getMessage(), 1);
4949
}
5050
}
5151
}

0 commit comments

Comments
 (0)