-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from mypreview/rate-5stars-notice
Encourage leaving a 5-star review from regular users
- Loading branch information
Showing
9 changed files
with
190 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,39 @@ | ||
/* global jQuery, ajaxurl, watVars */ | ||
|
||
( function ( wp, $ ) { | ||
const wooTermsAdmin = { | ||
'use strict'; | ||
|
||
if ( ! wp ) { | ||
return; | ||
} | ||
|
||
const watAdmin = { | ||
cache() { | ||
this.vars = {}; | ||
this.vars.upsell = '.notice-info.woocommerce-message.is-dismissible .notice-dismiss'; | ||
this.vars.rate = '#woo-additional-terms-dismiss-rate .notice-dismiss'; | ||
this.vars.upsell = '#woo-additional-terms-dismiss-upsell .notice-dismiss'; | ||
}, | ||
|
||
init() { | ||
this.cache(); | ||
$( document.body ).on( 'click', this.vars.upsell, this.handleOnDismiss ); | ||
$( document.body ).on( 'click', this.vars.rate, ( event ) => this.handleOnDismiss( event, 'rate' ) ); | ||
$( document.body ).on( 'click', this.vars.upsell, ( event ) => this.handleOnDismiss( event, 'upsell' ) ); | ||
}, | ||
|
||
handleOnDismiss() { | ||
handleOnDismiss( event, action ) { | ||
event.preventDefault(); | ||
|
||
$.ajax( { | ||
type: 'POST', | ||
url: ajaxurl, | ||
data: { | ||
_ajax_nonce: watVars.dismiss_nonce, | ||
action: 'woo_additional_terms_dismiss_upsell', | ||
action: `woo_additional_terms_dismiss_${ action }`, | ||
}, | ||
dataType: 'json', | ||
} ); | ||
}, | ||
}; | ||
|
||
wooTermsAdmin.init(); | ||
watAdmin.init(); | ||
} )( window.wp, jQuery ); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,14 @@ | |
# This file is distributed under the GPL-3.0. | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Woo Additional Terms 1.4.0\n" | ||
"Project-Id-Version: Woo Additional Terms 1.4.1\n" | ||
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-additional-terms\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"POT-Creation-Date: 2022-11-24T19:48:18+00:00\n" | ||
"POT-Creation-Date: 2022-12-23T17:55:56+00:00\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"X-Generator: WP-CLI 2.7.1\n" | ||
"X-Domain: woo-additional-terms\n" | ||
|
@@ -31,153 +31,160 @@ msgstr "" | |
msgid "MyPreview" | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:128 | ||
#: woo-additioanl-terms.php:131 | ||
msgctxt "clone" | ||
msgid "Cloning instances of this class is forbidden." | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:138 | ||
#: woo-additioanl-terms.php:141 | ||
msgctxt "wakeup" | ||
msgid "Unserializing instances of this class is forbidden." | ||
msgstr "" | ||
|
||
#. translators: 1: Dashicon, Open anchor tag, 2: Close anchor tag. | ||
#: woo-additioanl-terms.php:162 | ||
#: woo-additioanl-terms.php:186 | ||
msgctxt "admin notice" | ||
msgid "%1$s requires the following plugin: %2$sWooCommerce%3$s" | ||
msgstr "" | ||
|
||
#. translators: 1: Dashicon, 2: HTML symbol, 3: Open anchor tag, 4: Close anchor tag. | ||
#: woo-additioanl-terms.php:174 | ||
#. translators: 1: HTML Symbol, 2: HTML symbol, 3: Open anchor tag, 4: Close anchor tag. | ||
#: woo-additioanl-terms.php:198 | ||
msgctxt "admin notice" | ||
msgid "%1$s Add unlimited “I Agree with terms & conditions” checkboxes to the WooCommerce checkout without any manual effort needed. %2$s %3$sUpgrade to PRO%4$s" | ||
msgstr "" | ||
|
||
#. translators: 1: HTML symbol, 2: Plugin name, 3: Activation duration, 4: HTML symbol, 5: Open anchor tag, 6: Close anchor tag. | ||
#: woo-additioanl-terms.php:202 | ||
msgctxt "admin notice" | ||
msgid "%1$s You have been using the %2$s plugin for %3$s now, do you like it as much as we like you? %4$s %5$sRate 5-Stars%6$s" | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:242 | ||
msgctxt "tab title" | ||
msgid "Additional Terms" | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:287 | ||
#. translators: 1: Open H2 tag, 2: Close H2 tag. | ||
#: woo-additioanl-terms.php:276 | ||
msgctxt "upsell" | ||
msgid "%1$sLooking to add more terms & condition checkboxes?%2$s" | ||
msgstr "" | ||
|
||
#. translators: 1: Open anchor tag, 2: Close anchor tag. | ||
#: woo-additioanl-terms.php:278 | ||
msgctxt "upsell" | ||
msgid "%1$sBuy PRO →%2$s" | ||
msgstr "" | ||
|
||
#. translators: 1: Open anchor tag, 2: Close anchor tag. | ||
#: woo-additioanl-terms.php:278 | ||
msgctxt "upsell" | ||
msgid "Upgrade to premium version to unlock more features!" | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:343 | ||
msgid "required" | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:347 | ||
#: woo-additioanl-terms.php:403 | ||
msgid "Accepted" | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:347 | ||
#: woo-additioanl-terms.php:403 | ||
msgid "N/A" | ||
msgstr "" | ||
|
||
#. translators: 1: Open anchor tag, 2: Close anchor tag. | ||
#: woo-additioanl-terms.php:374 | ||
#: woo-additioanl-terms.php:430 | ||
msgctxt "plugin settings page" | ||
msgid "%1$sSettings%2$s" | ||
msgstr "" | ||
|
||
#. translators: 1: Open anchor tag, 2: Close anchor tag. | ||
#: woo-additioanl-terms.php:395 | ||
#: woo-additioanl-terms.php:451 | ||
msgctxt "plugin link" | ||
msgid "%1$sCommunity support%2$s" | ||
msgstr "" | ||
|
||
#. translators: 1: Open anchor tag, 2: Close anchor tag. | ||
#: woo-additioanl-terms.php:397 | ||
#: woo-additioanl-terms.php:453 | ||
msgctxt "plugin link" | ||
msgid "%1$sDonate%2$s" | ||
msgstr "" | ||
|
||
#. translators: 1: Open anchor tag, 2: Close anchor tag. | ||
#: woo-additioanl-terms.php:397 | ||
#: woo-additioanl-terms.php:453 | ||
msgid "Donate to support this plugin" | ||
msgstr "" | ||
|
||
#. translators: 1: Open anchor tag, 2: Close anchor tag. | ||
#: woo-additioanl-terms.php:399 | ||
#: woo-additioanl-terms.php:455 | ||
msgctxt "plugin link" | ||
msgid "%1$sUpgrade to PRO%2$s" | ||
msgstr "" | ||
|
||
#. translators: 1: Dashicon, 2: Plugin name, 3: Open anchor tag, 4: Close anchor tag. | ||
#: woo-additioanl-terms.php:420 | ||
#: woo-additioanl-terms.php:476 | ||
msgctxt "admin notice" | ||
msgid "%1$s Thanks for installing %2$s plugin! To get started, visit the %3$splugin’s settings page%4$s." | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:444 | ||
msgctxt "upsell" | ||
msgid "Looking to add more terms & condition checkboxes?" | ||
msgstr "" | ||
|
||
#. translators: 1: Open anchor tag, 2: Close anchor tag. | ||
#: woo-additioanl-terms.php:447 | ||
msgctxt "upsell" | ||
msgid "%1$sUpgrade to PRO →%2$s" | ||
msgstr "" | ||
|
||
#. translators: 1: Open anchor tag, 2: Close anchor tag. | ||
#: woo-additioanl-terms.php:447 | ||
msgctxt "upsell" | ||
msgid "Upgrade to premium version to unlock more features!" | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:453 | ||
#: woo-additioanl-terms.php:501 | ||
msgctxt "settings section name" | ||
msgid "Terms and Conditions" | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:455 | ||
#: woo-additioanl-terms.php:503 | ||
msgctxt "settings section description" | ||
msgid "This section controls the display of your additional terms and condition fieldset." | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:458 | ||
#: woo-additioanl-terms.php:506 | ||
msgctxt "settings field name" | ||
msgid "Terms page" | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:459 | ||
#: woo-additioanl-terms.php:507 | ||
msgctxt "settings field description" | ||
msgid "If you define a \"Terms\" page the customer will be asked if they accept additional terms when checking out." | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:468 | ||
#: woo-additioanl-terms.php:516 | ||
msgctxt "settings field name" | ||
msgid "Notice content" | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:469 | ||
#: woo-additioanl-terms.php:517 | ||
msgctxt "settings field description" | ||
msgid "Text for the additional terms checkbox that customers must accept." | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:470 | ||
#: woo-additioanl-terms.php:518 | ||
msgctxt "settings field default value" | ||
msgid "I have read and agree to the website [additional-terms]" | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:471 | ||
#: woo-additioanl-terms.php:519 | ||
msgctxt "settings field placeholder" | ||
msgid "I have read and agree to the website [additional-terms]" | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:479 | ||
#: woo-additioanl-terms.php:527 | ||
msgctxt "settings field name" | ||
msgid "Error message" | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:480 | ||
#: woo-additioanl-terms.php:528 | ||
msgctxt "settings field description" | ||
msgid "Display friendly notice whenever customer doesn’t accept additional terms." | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:481 | ||
#: woo-additioanl-terms.php:529 | ||
msgctxt "settings field default value" | ||
msgid "Please read and accept the additional terms and conditions to proceed with your order. " | ||
msgstr "" | ||
|
||
#: woo-additioanl-terms.php:482 | ||
#: woo-additioanl-terms.php:530 | ||
msgctxt "setting field placeholder" | ||
msgid "You must accept our additional terms." | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.