Skip to content

Commit 605da15

Browse files
authored
Merge pull request #3 from skyverge/forward-fixes
Forward fixes
2 parents e0763b4 + 4582dfe commit 605da15

5 files changed

Lines changed: 90 additions & 20 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ Download and install just like any other WordPress plugin. If you want to be rea
4444

4545
## Changelog
4646

47+
### 0.7.1-dev - YYYY.MM.DD
48+
* Tweak - Remove dependency on WooCommerce
49+
* Tweak - Add support for domain forwarding as early as possible
50+
4751
### 0.7.0 - 2017.04.12
4852
* Feature - Use the Bogus gateway for Subscriptions automatic renewals
4953
* Fix - Subscriptions integration throwing a warning in WooCommerce 3.0+
Lines changed: 71 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,78 @@
1-
# Copyright (C) 2016 SkyVerge
1+
# Copyright (C) 2017 SkyVerge
22
# This file is distributed under the GNU General Public License v3.0.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: WooCommerce Dev Helper 0.4.2\n"
5+
"Project-Id-Version: A WooCommerce Dev Helper 0.7.1-dev\n"
66
"Report-Msgid-Bugs-To: "
77
"https://github.com/skyverge/woocommerce-dev-helper/issues\n"
88
"POT-Creation-Date: 2015-07-26 19:51:27+00:00\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=utf-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
12+
"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
1515

16+
#: includes/class-wc-dev-helper-bogus-gateway.php:42
17+
msgid "Bogus"
18+
msgstr ""
19+
20+
#: includes/class-wc-dev-helper-bogus-gateway.php:43
21+
msgid ""
22+
"A testing gateway that calls \"payment complete\" to simulate credit card "
23+
"transactions."
24+
msgstr ""
25+
26+
#: includes/class-wc-dev-helper-bogus-gateway.php:92
27+
msgid "Enable/Disable"
28+
msgstr ""
29+
30+
#: includes/class-wc-dev-helper-bogus-gateway.php:94
31+
msgid "Enable Bogus Gateway"
32+
msgstr ""
33+
34+
#: includes/class-wc-dev-helper-bogus-gateway.php:99
35+
msgid "Title"
36+
msgstr ""
37+
38+
#: includes/class-wc-dev-helper-bogus-gateway.php:101
39+
msgid ""
40+
"This controls the title for the payment method the customer sees during "
41+
"checkout."
42+
msgstr ""
43+
44+
#: includes/class-wc-dev-helper-bogus-gateway.php:102
45+
msgid "Bogus (Test)"
46+
msgstr ""
47+
48+
#: includes/class-wc-dev-helper-bogus-gateway.php:107
49+
msgid "Description"
50+
msgstr ""
51+
52+
#: includes/class-wc-dev-helper-bogus-gateway.php:109
53+
msgid "Payment method description that the customer will see on your checkout."
54+
msgstr ""
55+
56+
#: includes/class-wc-dev-helper-bogus-gateway.php:110
57+
msgid "Nothingtodohere &#128640;"
58+
msgstr ""
59+
60+
#: includes/class-wc-dev-helper-bogus-gateway.php:115
61+
msgid "Enable Subscriptions support?"
62+
msgstr ""
63+
64+
#: includes/class-wc-dev-helper-bogus-gateway.php:117
65+
msgid "Makes the gateway available for subscriptions purchases"
66+
msgstr ""
67+
68+
#: includes/class-wc-dev-helper-bogus-gateway.php:150
69+
msgid "Bogus is always approved &#128526;"
70+
msgstr ""
71+
72+
#: includes/class-wc-dev-helper-bogus-gateway.php:175
73+
msgid "Renewal order processed. Bogus is always approved &#128526;"
74+
msgstr ""
75+
1676
#: includes/class-wc-dev-helper-memberships.php:55
1777
msgid "minute(s)"
1878
msgstr ""
@@ -21,32 +81,32 @@ msgstr ""
2181
msgid "hour(s)"
2282
msgstr ""
2383

24-
#: includes/class-wc-dev-helper-subscriptions.php:97
84+
#: includes/class-wc-dev-helper-subscriptions.php:98
2585
msgid "Renew"
2686
msgstr ""
2787

28-
#: includes/class-wc-dev-helper-subscriptions.php:150
88+
#: includes/class-wc-dev-helper-subscriptions.php:151
2989
msgid "Subscription renewal processed. %sView Renewal Order%s"
3090
msgstr ""
3191

32-
#: includes/class-wc-dev-helper-subscriptions.php:173
92+
#: includes/class-wc-dev-helper-subscriptions.php:174
3393
msgid "Action Failed, Invalid Nonce"
3494
msgstr ""
3595

36-
#: includes/class-wc-dev-helper-subscriptions.php:202
96+
#: includes/class-wc-dev-helper-subscriptions.php:203
3797
msgid "Subscription Renewal Processed"
3898
msgstr ""
3999

40-
#: woocommerce-dev-helper.php:261
100+
#: woocommerce-dev-helper.php:346
41101
msgid "You cannot clone instances of WooCommerce Dev Helper."
42102
msgstr ""
43103

44-
#: woocommerce-dev-helper.php:271
104+
#: woocommerce-dev-helper.php:356
45105
msgid "You cannot unserialize instances of WooCommerce Dev Helper."
46106
msgstr ""
47107

48108
#. Plugin Name of the plugin/theme
49-
msgid "WooCommerce Dev Helper"
109+
msgid "A WooCommerce Dev Helper"
50110
msgstr ""
51111

52112
#. Plugin URI of the plugin/theme
@@ -63,4 +123,4 @@ msgstr ""
63123

64124
#. Author URI of the plugin/theme
65125
msgid "http://www.skyverge.com"
66-
msgstr ""
126+
msgstr ""

includes/class-wc-dev-helper-bogus-gateway.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818

1919
defined( 'ABSPATH' ) or exit;
2020

21+
if ( ! class_exists( 'WC_Payment_Gateway' ) ) {
22+
return;
23+
}
24+
2125
/**
2226
* Adds a testing gateway that calls the WooCommerce payment_complete() method.
2327
*

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "woocommerce-dev-helper",
3-
"version": "0.5.0",
2+
"name": "a-woocommerce-dev-helper",
3+
"version": "0.7.1-dev",
44
"author": "SkyVerge Team",
55
"homepage": "http://www.skyverge.com",
66
"repository": {

woocommerce-dev-helper.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Plugin Name: WooCommerce Dev Helper
3+
* Plugin Name: A WooCommerce Dev Helper
44
* Plugin URI: https://github.com/skyverge/woocommerce-dev-helper/
55
* Description: A simple plugin for helping develop/debug WooCommerce & extensions
66
* Author: SkyVerge
@@ -69,13 +69,19 @@ public function __construct() {
6969

7070
// add some inline JS
7171
add_action( 'wp_footer', array( $this, 'enqueue_scripts' ) );
72-
add_action( 'wp_head', array( $this, 'bogus_gateway_styles' ) );
72+
if ( $this->is_plugin_active( 'woocommerce.php' ) ) {
73+
add_action( 'wp_head', array( $this, 'bogus_gateway_styles' ) );
74+
}
7375

7476
// add the testing gateway
7577
add_filter( 'woocommerce_payment_gateways', array( $this, 'add_bogus_gateway' ) );
7678

7779
// filter default Elavon test card
7880
add_filter( 'woocommerce_elavon_credit_card_default_values', array( $this, 'change_elavon_test_values' ), 10, 2 );
81+
82+
// use forwarded URLs: this needs to be done as early as possible in order to set the $_SERVER['HTTPS'] var
83+
require_once( $this->get_plugin_path() . '/includes/class-wc-dev-helper-use-forwarded-urls.php' );
84+
$this->use_forwarded_urls = new WC_Dev_Helper_Use_Forwarded_URLs();
7985
}
8086

8187

@@ -165,15 +171,11 @@ public function includes() {
165171
$this->ajax = new WC_Dev_Helper_Ajax();
166172
}
167173

168-
require_once( $this->get_plugin_path() . '/includes/class-wc-dev-helper-bogus-gateway.php' );
169174
if ( $this->is_plugin_active( 'woocommerce.php' ) ) {
175+
require_once( $this->get_plugin_path() . '/includes/class-wc-dev-helper-bogus-gateway.php' );
170176
$this->gateway = new WC_Bogus_Gateway();
171177
}
172178

173-
// use forwarded URLs
174-
require_once( $this->get_plugin_path() . '/includes/class-wc-dev-helper-use-forwarded-urls.php' );
175-
$this->use_forwarded_urls = new WC_Dev_Helper_Use_Forwarded_URLs();
176-
177179
if ( $this->is_plugin_active( 'woocommerce-subscriptions.php' ) ) {
178180

179181
// Subscriptions helper

0 commit comments

Comments
 (0)