Skip to content

Commit

Permalink
fixed api domain
Browse files Browse the repository at this point in the history
  • Loading branch information
timoj committed Mar 27, 2018
1 parent 8462331 commit 1d5e113
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions includes/wcwuunder-create.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class WC_Wuunder_Create
{
public $order_id;
private $version_obj = array("product" => "Woocommerce extension", "version" => array("build" => "2.2.2", "plugin" => "2.0"));
private $version_obj = array("product" => "Woocommerce extension", "version" => array("build" => "2.3.0", "plugin" => "2.0"));

public function __construct()
{
Expand Down Expand Up @@ -123,10 +123,10 @@ public function generateBookingUrl()

$status = get_option('wc_wuunder_api_status');
if ($status == 'productie') {
$apiUrl = 'https://api.wuunder.co/api/bookings?redirect_url=' . $redirectUrl . '&webhook_url=' . $webhookUrl;
$apiUrl = 'https://api.wearewuunder.com/api/bookings?redirect_url=' . $redirectUrl . '&webhook_url=' . $webhookUrl;
$apiKey = get_option('wc_wuunder_api');
} else {
$apiUrl = 'https://api-staging.wuunder.co/api/bookings?redirect_url=' . $redirectUrl . '&webhook_url=' . $webhookUrl;
$apiUrl = 'https://api-staging.wearewuunder.com/api/bookings?redirect_url=' . $redirectUrl . '&webhook_url=' . $webhookUrl;
$apiKey = get_option('wc_wuunder_test_api');
}

Expand Down Expand Up @@ -161,9 +161,9 @@ public function generateBookingUrl()
update_post_meta($order_id, '_wuunder_label_booking_url', $url);
if (!(substr($url, 0, 5) === "http:" || substr($url, 0, 6) === "https:")) {
if ($status == 'productie') {
$url = 'https://api.wuunder.co' . $url;
$url = 'https://api.wearewuunder.com' . $url;
} else {
$url = 'https://api-staging.wuunder.co' . $url;
$url = 'https://api-staging.wearewuunder.com' . $url;
}
}
wp_redirect($url);
Expand Down
4 changes: 2 additions & 2 deletions woocommerce-wuunder.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WooCommerce Wuunder
* Plugin URI: http://wearewuunder.com
* Description: Wuunder shipping plugin
* Version: 2.2.2
* Version: 2.3.0
* Author: Wuunder
* Author URI: http://wearewuunder.com
*/
Expand Down Expand Up @@ -49,7 +49,7 @@ class Woocommerce_Wuunder
public static $plugin_path;
public static $plugin_basename;

const VERSION = '2.2.2';
const VERSION = '2.3.0';

public function __construct()
{
Expand Down

0 comments on commit 1d5e113

Please sign in to comment.