Skip to content

Commit 235dc9a

Browse files
committed
staging for multi-site configuration
1 parent 99f2186 commit 235dc9a

File tree

4 files changed

+42
-8
lines changed

4 files changed

+42
-8
lines changed

src/WooCommerceServiceProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public function boot()
1515
{
1616
$this->publishes([
1717
__DIR__.'/config/woocommerce.php' => config_path('woocommerce.php'),
18+
__DIR__.'/config/multisite.php' => config_path('multisite.php'),
1819
], 'woocommerce');
1920
}
2021

src/config/multisite.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
return [
4+
"development" => [
5+
"store_url" => "YOUR_STORE_URL",
6+
"consumer_key" => "YOUR_CONSUMER_KEY",
7+
"consumer_secret" => "YOUR_CONSUMER_SECRET",
8+
"verify_ssl" => false,
9+
"api_version" => "v3",
10+
"wp_api" => true,
11+
"query_string_auth" => false,
12+
"timeout" => 100,
13+
"header_total" => "X-WP-Total",
14+
"header_total_pages" => "X-WP-TotalPages"
15+
],
16+
"staging" => [
17+
"store_url" => "YOUR_STORE_URL",
18+
"consumer_key" => "YOUR_CONSUMER_KEY",
19+
"consumer_secret" => "YOUR_CONSUMER_SECRET",
20+
"verify_ssl" => false,
21+
"api_version" => "v3",
22+
"wp_api" => true,
23+
"query_string_auth" => false,
24+
"timeout" => 100,
25+
"header_total" => "X-WP-Total",
26+
"header_total_pages" => "X-WP-TotalPages"
27+
],
28+
"production" => [
29+
"store_url" => "YOUR_STORE_URL",
30+
"consumer_key" => "YOUR_CONSUMER_KEY",
31+
"consumer_secret" => "YOUR_CONSUMER_SECRET",
32+
"verify_ssl" => false,
33+
"api_version" => "v3",
34+
"wp_api" => true,
35+
"query_string_auth" => false,
36+
"timeout" => 100,
37+
"header_total" => "X-WP-Total",
38+
"header_total_pages" => "X-WP-TotalPages"
39+
]
40+
];

src/config/woocommerce-multiconfig.php

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/config/woocommerce.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Store URL eg: http://example.com
77
*================================================================================.
88
*/
9-
'store_url' => env('WOOCOMMERCE_STORE_URL', 'YOUR_STORE_URL'),
9+
'store_url' => config( "multisite." . env('WOOCOMMERCE_DEFAULT_STORE', 'development') ".store_url"),
1010

1111
/**
1212
*================================================================================

0 commit comments

Comments
 (0)