Skip to content

Commit

Permalink
Merge branch 'release/2.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Mar 8, 2017
2 parents 0134df4 + 9e7c70f commit 02ac564
Show file tree
Hide file tree
Showing 17 changed files with 61 additions and 55 deletions.
7 changes: 6 additions & 1 deletion change_log.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---------------------------------------------------------------------
Version 2.5
- Added security enhancement.
- Added 'isCoupon' flag when adding coupons to order summary; allows 3rd parties to more reliable identify coupons in the order summary.

---------------------------------------------------------------------
Version 2.4
- Added gform_coupons_is_valid_code to override coupon code alphanumeric checking in Gravity Forms 2.2.2.
Expand Down Expand Up @@ -95,4 +100,4 @@ Version 1.0
Version 1.0.beta1.1
- Added POT file

---------------------------------------------------------------------
---------------------------------------------------------------------
5 changes: 3 additions & 2 deletions class-gf-coupons.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ public function add_discounts( $product_info, $form, $entry ) {
'option_label' => esc_html__( 'Coupon Code:', 'gravityformscoupons' ) . ' ' . $coupon['code'],
'price' => 0,
),
)
),
'isCoupon' => true,
);
}

Expand Down Expand Up @@ -1420,4 +1421,4 @@ public function get_old_feeds() {
return $results;
}

}
}
4 changes: 2 additions & 2 deletions class-gf-field-coupon.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function validate( $value, $form ) {

$feed = gf_coupons()->get_config( $form, $coupon_code );
if ( ! $feed ) {
$message = sprintf( esc_html__( 'Coupon code: %s is invalid.', 'gravityformscoupons' ), $coupon_code );
$message = sprintf( esc_html__( 'Coupon code: %s is invalid.', 'gravityformscoupons' ), esc_html( $coupon_code ) );
break;
}

Expand Down Expand Up @@ -212,4 +212,4 @@ public function get_value_export( $entry, $input_id = '', $use_text = false, $is

}

GF_Fields::register( new GF_Field_Coupon() );
GF_Fields::register( new GF_Field_Coupon() );
6 changes: 3 additions & 3 deletions coupons.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Gravity Forms Coupons Add-On
Plugin URI: http://www.gravityforms.com
Description: Enables Gravity Forms administrators to create coupon codes that can be applied to products, services or subscriptions when used in conjunction with a payment add-on such as PayPal and Authorize.net
Version: 2.4
Version: 2.5
Author: rocketgenius
Author URI: http://www.rocketgenius.com
Text Domain: gravityformscoupons
Expand All @@ -27,7 +27,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

define( 'GF_COUPONS_VERSION', '2.4' );
define( 'GF_COUPONS_VERSION', '2.5' );

add_action( 'gform_loaded', array( 'GF_Coupons_Bootstrap', 'load' ), 5 );

Expand All @@ -47,4 +47,4 @@ public static function load(){

function gf_coupons(){
return GFCoupons::get_instance();
}
}
Binary file added languages/gravityformscoupons-da_DK.mo
Binary file not shown.
Binary file added languages/gravityformscoupons-de_DE.mo
Binary file not shown.
Binary file added languages/gravityformscoupons-en_AU.mo
Binary file not shown.
Binary file added languages/gravityformscoupons-en_GB.mo
Binary file not shown.
Binary file modified languages/gravityformscoupons-es_ES.mo
Binary file not shown.
Binary file added languages/gravityformscoupons-fi.mo
Binary file not shown.
Binary file added languages/gravityformscoupons-fr_FR.mo
Binary file not shown.
Binary file added languages/gravityformscoupons-it_IT.mo
Binary file not shown.
Binary file modified languages/gravityformscoupons-nl_NL.mo
Binary file not shown.
Binary file added languages/gravityformscoupons-pt_BR.mo
Binary file not shown.
Binary file added languages/gravityformscoupons-pt_PT.mo
Binary file not shown.
Binary file added languages/gravityformscoupons-ru_RU.mo
Binary file not shown.
94 changes: 47 additions & 47 deletions languages/gravityformscoupons.pot
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright 2009-2017 Rocketgenius, Inc.
msgid ""
msgstr ""
"Project-Id-Version: Gravity Forms Coupons Add-On 2.4\n"
"Project-Id-Version: Gravity Forms Coupons Add-On 2.5\n"
"Report-Msgid-Bugs-To: http://www.gravtiyhelp.com\n"
"POT-Creation-Date: 2017-01-05 19:25:39+00:00\n"
"POT-Creation-Date: 2017-02-22 21:31:33+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -28,190 +28,190 @@ msgstr ""
msgid "Coupon Code:"
msgstr ""

#: class-gf-coupons.php:250
#: class-gf-coupons.php:251
msgid "You must enter a value for coupon code."
msgstr ""

#: class-gf-coupons.php:264 class-gf-coupons.php:1042 class-gf-coupons.php:1151
#: class-gf-coupons.php:265 class-gf-coupons.php:1043 class-gf-coupons.php:1152
msgid "Invalid coupon."
msgstr ""

#: class-gf-coupons.php:326
#: class-gf-coupons.php:327
msgid ""
"The %s has been successfully uninstalled. It can be re-activated from the "
"%splugins page%s."
msgstr ""

#: class-gf-coupons.php:454
#: class-gf-coupons.php:455
msgid "Edit this feed"
msgstr ""

#: class-gf-coupons.php:454
#: class-gf-coupons.php:455
msgid "Edit"
msgstr ""

#: class-gf-coupons.php:471
#: class-gf-coupons.php:472
msgid "Delete"
msgstr ""

#: class-gf-coupons.php:472
#: class-gf-coupons.php:473
msgid "Reset Usage Count"
msgstr ""

#: class-gf-coupons.php:507
#: class-gf-coupons.php:508
msgid "Title"
msgstr ""

#: class-gf-coupons.php:508
#: class-gf-coupons.php:509
msgid "Form"
msgstr ""

#: class-gf-coupons.php:509
#: class-gf-coupons.php:510
msgid "Amount"
msgstr ""

#: class-gf-coupons.php:510 class-gf-coupons.php:698 class-gf-coupons.php:700
#: class-gf-coupons.php:511 class-gf-coupons.php:699 class-gf-coupons.php:701
msgid "Usage Limit"
msgstr ""

#: class-gf-coupons.php:511 class-gf-coupons.php:716
#: class-gf-coupons.php:512 class-gf-coupons.php:717
msgid "Usage Count"
msgstr ""

#: class-gf-coupons.php:512
#: class-gf-coupons.php:513
msgid "Expires"
msgstr ""

#: class-gf-coupons.php:513 class-gf-coupons.php:704 class-gf-coupons.php:706
#: class-gf-coupons.php:709
#: class-gf-coupons.php:514 class-gf-coupons.php:705 class-gf-coupons.php:707
#: class-gf-coupons.php:710
msgid "Is Stackable"
msgstr ""

#: class-gf-coupons.php:548 class-gf-coupons.php:735
#: class-gf-coupons.php:549 class-gf-coupons.php:736
msgid "Any Form"
msgstr ""

#: class-gf-coupons.php:553
#: class-gf-coupons.php:554
msgid "Invalid Form"
msgstr ""

#: class-gf-coupons.php:634
#: class-gf-coupons.php:635
msgid "Applies to Which Form?"
msgstr ""

#: class-gf-coupons.php:639 class-gf-coupons.php:643
#: class-gf-coupons.php:640 class-gf-coupons.php:644
msgid "Gravity Form"
msgstr ""

#: class-gf-coupons.php:643
#: class-gf-coupons.php:644
msgid "Select the Gravity Form you would like to integrate with Coupons."
msgstr ""

#: class-gf-coupons.php:648
#: class-gf-coupons.php:649
msgid "Coupon Basics"
msgstr ""

#: class-gf-coupons.php:654 class-gf-coupons.php:657
#: class-gf-coupons.php:655 class-gf-coupons.php:658
msgid "Coupon Name"
msgstr ""

#: class-gf-coupons.php:657
#: class-gf-coupons.php:658
msgid "Enter coupon name."
msgstr ""

#: class-gf-coupons.php:661 class-gf-coupons.php:665
#: class-gf-coupons.php:662 class-gf-coupons.php:666
msgid "Coupon Code"
msgstr ""

#: class-gf-coupons.php:665
#: class-gf-coupons.php:666
msgid "Enter the value users should enter to apply this coupon to the form total."
msgstr ""

#: class-gf-coupons.php:669 class-gf-coupons.php:673
#: class-gf-coupons.php:670 class-gf-coupons.php:674
msgid "Coupon Amount"
msgstr ""

#: class-gf-coupons.php:673
#: class-gf-coupons.php:674
msgid "Enter the amount to be deducted from the form total."
msgstr ""

#: class-gf-coupons.php:678
#: class-gf-coupons.php:679
msgid "Coupon Options"
msgstr ""

#: class-gf-coupons.php:684 class-gf-coupons.php:686
#: class-gf-coupons.php:685 class-gf-coupons.php:687
msgid "Start Date"
msgstr ""

#: class-gf-coupons.php:686
#: class-gf-coupons.php:687
msgid "Enter the date when the coupon should start."
msgstr ""

#: class-gf-coupons.php:691 class-gf-coupons.php:693
#: class-gf-coupons.php:692 class-gf-coupons.php:694
msgid "End Date"
msgstr ""

#: class-gf-coupons.php:693
#: class-gf-coupons.php:694
msgid "Enter the date when the coupon should expire."
msgstr ""

#: class-gf-coupons.php:700
#: class-gf-coupons.php:701
msgid "Enter the number of times coupon code can be used."
msgstr ""

#: class-gf-coupons.php:706
#: class-gf-coupons.php:707
msgid ""
"When the \"Is Stackable\" option is selected, this coupon code will be "
"allowed to be used in conjunction with another coupon code."
msgstr ""

#: class-gf-coupons.php:734
#: class-gf-coupons.php:735
msgid "Select a Form"
msgstr ""

#: class-gf-coupons.php:824
#: class-gf-coupons.php:825
msgid "Flat"
msgstr ""

#: class-gf-coupons.php:829
#: class-gf-coupons.php:830
msgid "Percentage(%)"
msgstr ""

#: class-gf-coupons.php:862
#: class-gf-coupons.php:863
msgid "This field is required."
msgstr ""

#: class-gf-coupons.php:887
#: class-gf-coupons.php:888
msgid ""
"Please enter a valid Coupon Code. The Coupon Code can only contain "
"alphanumeric characters."
msgstr ""

#: class-gf-coupons.php:899
#: class-gf-coupons.php:900
msgid ""
"The Coupon Code entered is already in use. Please enter a unique Coupon "
"Code and try again."
msgstr ""

#: class-gf-coupons.php:1053
#: class-gf-coupons.php:1054
msgid "This coupon can't be applied more than once."
msgstr ""

#: class-gf-coupons.php:1064
#: class-gf-coupons.php:1065
msgid ""
"This coupon can't be used in conjunction with other coupons you have "
"already entered."
msgstr ""

#: class-gf-coupons.php:1139
#: class-gf-coupons.php:1140
msgid "This coupon is currently inactive."
msgstr ""

#: class-gf-coupons.php:1158
#: class-gf-coupons.php:1159
msgid "This coupon has expired."
msgstr ""

#: class-gf-coupons.php:1170
#: class-gf-coupons.php:1171
msgid "This coupon has reached its usage limit."
msgstr ""

Expand Down

0 comments on commit 02ac564

Please sign in to comment.