Changeset 3044506
- Timestamp:
- 03/03/2024 03:02:21 PM (2 years ago)
- Location:
- woo-2checkout
- Files:
-
- 114 added
- 4 edited
-
tags/2.0.7 (added)
-
tags/2.0.7/README.txt (added)
-
tags/2.0.7/images (added)
-
tags/2.0.7/images/2checkout-dark.svg (added)
-
tags/2.0.7/images/2checkout-light.svg (added)
-
tags/2.0.7/includes (added)
-
tags/2.0.7/includes/class-woo-2checkout-gateway-api.php (added)
-
tags/2.0.7/includes/class-woo-2checkout-gateway.php (added)
-
tags/2.0.7/includes/functions.php (added)
-
tags/2.0.7/languages (added)
-
tags/2.0.7/languages/woo-2checkout.pot (added)
-
tags/2.0.7/woo-2checkout.php (added)
-
tags/3.0.0 (added)
-
tags/3.0.0/README.txt (added)
-
tags/3.0.0/build (added)
-
tags/3.0.0/build/convert-plus-block.asset.php (added)
-
tags/3.0.0/build/convert-plus-block.js (added)
-
tags/3.0.0/changelog.txt (added)
-
tags/3.0.0/images (added)
-
tags/3.0.0/images/2checkout-dark.svg (added)
-
tags/3.0.0/images/2checkout-light.svg (added)
-
tags/3.0.0/includes (added)
-
tags/3.0.0/includes/API.php (added)
-
tags/3.0.0/includes/Common.php (added)
-
tags/3.0.0/includes/ConvertPlus (added)
-
tags/3.0.0/includes/ConvertPlus/ConvertPlus_Block.php (added)
-
tags/3.0.0/includes/ConvertPlus/ConvertPlus_Gateway.php (added)
-
tags/3.0.0/includes/Extended_Plugin_Upgrade_Notice.php (added)
-
tags/3.0.0/includes/Payment_Gateway.php (added)
-
tags/3.0.0/includes/Plugin.php (added)
-
tags/3.0.0/includes/functions.php (added)
-
tags/3.0.0/languages (added)
-
tags/3.0.0/languages/woo-2checkout.pot (added)
-
tags/3.0.0/uninstall.php (added)
-
tags/3.0.0/vendor (added)
-
tags/3.0.0/vendor/autoload.php (added)
-
tags/3.0.0/vendor/composer (added)
-
tags/3.0.0/vendor/composer/ClassLoader.php (added)
-
tags/3.0.0/vendor/composer/InstalledVersions.php (added)
-
tags/3.0.0/vendor/composer/LICENSE (added)
-
tags/3.0.0/vendor/composer/autoload_classmap.php (added)
-
tags/3.0.0/vendor/composer/autoload_namespaces.php (added)
-
tags/3.0.0/vendor/composer/autoload_psr4.php (added)
-
tags/3.0.0/vendor/composer/autoload_real.php (added)
-
tags/3.0.0/vendor/composer/autoload_static.php (added)
-
tags/3.0.0/vendor/composer/installed.json (added)
-
tags/3.0.0/vendor/composer/installed.php (added)
-
tags/3.0.0/vendor/composer/platform_check.php (added)
-
tags/3.0.0/vendor/storepress (added)
-
tags/3.0.0/vendor/storepress/admin-utils (added)
-
tags/3.0.0/vendor/storepress/admin-utils/README.md (added)
-
tags/3.0.0/vendor/storepress/admin-utils/assets (added)
-
tags/3.0.0/vendor/storepress/admin-utils/assets/admin-settings.asset.php (added)
-
tags/3.0.0/vendor/storepress/admin-utils/assets/admin-settings.css (added)
-
tags/3.0.0/vendor/storepress/admin-utils/assets/admin-settings.js (added)
-
tags/3.0.0/vendor/storepress/admin-utils/composer.json (added)
-
tags/3.0.0/vendor/storepress/admin-utils/includes (added)
-
tags/3.0.0/vendor/storepress/admin-utils/includes/Field.php (added)
-
tags/3.0.0/vendor/storepress/admin-utils/includes/Fields.php (added)
-
tags/3.0.0/vendor/storepress/admin-utils/includes/Menu.php (added)
-
tags/3.0.0/vendor/storepress/admin-utils/includes/REST_API.php (added)
-
tags/3.0.0/vendor/storepress/admin-utils/includes/Section.php (added)
-
tags/3.0.0/vendor/storepress/admin-utils/includes/Settings.php (added)
-
tags/3.0.0/vendor/storepress/admin-utils/includes/Updater.php (added)
-
tags/3.0.0/vendor/storepress/admin-utils/includes/Upgrade_Notice.php (added)
-
tags/3.0.0/vendor/storepress/admin-utils/includes/templates (added)
-
tags/3.0.0/vendor/storepress/admin-utils/includes/templates/classic-template.php (added)
-
tags/3.0.0/woo-2checkout.php (added)
-
trunk/README.txt (modified) (6 diffs)
-
trunk/build (added)
-
trunk/build/convert-plus-block.asset.php (added)
-
trunk/build/convert-plus-block.js (added)
-
trunk/changelog.txt (added)
-
trunk/includes/API.php (added)
-
trunk/includes/Common.php (added)
-
trunk/includes/ConvertPlus (added)
-
trunk/includes/ConvertPlus/ConvertPlus_Block.php (added)
-
trunk/includes/ConvertPlus/ConvertPlus_Gateway.php (added)
-
trunk/includes/Extended_Plugin_Upgrade_Notice.php (added)
-
trunk/includes/Payment_Gateway.php (added)
-
trunk/includes/Plugin.php (added)
-
trunk/includes/functions.php (modified) (1 diff)
-
trunk/languages/woo-2checkout.pot (modified) (1 diff)
-
trunk/uninstall.php (added)
-
trunk/vendor (added)
-
trunk/vendor/autoload.php (added)
-
trunk/vendor/composer (added)
-
trunk/vendor/composer/ClassLoader.php (added)
-
trunk/vendor/composer/InstalledVersions.php (added)
-
trunk/vendor/composer/LICENSE (added)
-
trunk/vendor/composer/autoload_classmap.php (added)
-
trunk/vendor/composer/autoload_namespaces.php (added)
-
trunk/vendor/composer/autoload_psr4.php (added)
-
trunk/vendor/composer/autoload_real.php (added)
-
trunk/vendor/composer/autoload_static.php (added)
-
trunk/vendor/composer/installed.json (added)
-
trunk/vendor/composer/installed.php (added)
-
trunk/vendor/composer/platform_check.php (added)
-
trunk/vendor/storepress (added)
-
trunk/vendor/storepress/admin-utils (added)
-
trunk/vendor/storepress/admin-utils/README.md (added)
-
trunk/vendor/storepress/admin-utils/assets (added)
-
trunk/vendor/storepress/admin-utils/assets/admin-settings.asset.php (added)
-
trunk/vendor/storepress/admin-utils/assets/admin-settings.css (added)
-
trunk/vendor/storepress/admin-utils/assets/admin-settings.js (added)
-
trunk/vendor/storepress/admin-utils/composer.json (added)
-
trunk/vendor/storepress/admin-utils/includes (added)
-
trunk/vendor/storepress/admin-utils/includes/Field.php (added)
-
trunk/vendor/storepress/admin-utils/includes/Fields.php (added)
-
trunk/vendor/storepress/admin-utils/includes/Menu.php (added)
-
trunk/vendor/storepress/admin-utils/includes/REST_API.php (added)
-
trunk/vendor/storepress/admin-utils/includes/Section.php (added)
-
trunk/vendor/storepress/admin-utils/includes/Settings.php (added)
-
trunk/vendor/storepress/admin-utils/includes/Updater.php (added)
-
trunk/vendor/storepress/admin-utils/includes/Upgrade_Notice.php (added)
-
trunk/vendor/storepress/admin-utils/includes/templates (added)
-
trunk/vendor/storepress/admin-utils/includes/templates/classic-template.php (added)
-
trunk/woo-2checkout.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
woo-2checkout/trunk/README.txt
r2587161 r3044506 2 2 Contributors: EmranAhmed, getwooplugins 3 3 Tags: 2checkout, 2checkout for woocommerce, 2checkout payment gateway, payment gateway, woocommerce payment gateway 4 Stable tag: trunk 5 Requires PHP: 7.0 6 Requires at least: 5.5 7 Tested up to: 5.8 8 WC requires at least: 5.2 9 WC tested up to: 5.6 4 Stable tag: 3.0.0 5 Requires PHP: 7.4 6 Requires at least: 6.1 7 Tested up to: 6.4 10 8 License: GPLv3 11 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 15 13 == Description == 16 14 17 === How To Set up 2Checkout Payment Gateway for WooCommerce In WordPress ===15 === How To Set up 2Checkout Payment Gateway for WooCommerce In WordPress === 18 16 19 17 [youtube https://www.youtube.com/watch?v=zev3t0HnYyI] … … 27 25 Withdrawing fund is easy in 2Checkout. You can get paid many of currencies and plenty of methods including Electronic Funds Transfer that goes directly to your bank accounts, international Wire Transfer, or a 2Checkout branded Payoneer MasterCard. 28 26 27 = Basic Features = 29 28 30 = Basic Feature = 31 29 * 2Checkout SHA2/SHA3 algorithm supported. 30 * WooCommerce Checkout Block supported. 31 * WooCommerce High-performance order storage supported. 32 32 * Enable Standard Checkout. 33 33 * Enable/Disable 2Checkout Payment Gateway … … 49 49 [youtube https://www.youtube.com/watch?v=4US5YeUK_5k] 50 50 51 * WooCommerce Checkout Block supported. 51 52 * Support WooCommerce Subscription. Both simple and variable subscription. 52 * Support multiple subscription payment on a single checkout.53 53 * Enable Inline/Popup Checkout. 54 54 * Refund Sales from WordPress Admin … … 57 57 == Installation == 58 58 59 ### Automatic Install From WordPress Dashboard59 ### Automatic Installation From WordPress Dashboard 60 60 61 1. Login to your theadmin panel61 1. Login to your WordPress admin panel 62 62 2. Navigate to Plugins -> Add New 63 63 3. Search **Payment Gateway - 2Checkout for WooCommerce** 64 64 4. Click install and activate respectively. 65 65 66 ### Manual Install From WordPress Dashboard66 ### Manual Installation From WordPress Dashboard 67 67 68 68 If your server is not connected to the Internet, then you can use this method- … … 85 85 86 86 == Changelog == 87 88 = 3.0.0 = 89 90 * WooCommerce High-performance order storage Supported. 91 * WooCommerce Checkout Block Supported. 92 * Add: Support SHA2/SHA3 algorithm. 2Checkout will stop supporting the MD5 algorithm in their platform on the 15th of April, 2024. 93 * Add: WP 6.4+ and WC 8.6+ compatibility 87 94 88 95 = 2.0.7 = -
woo-2checkout/trunk/includes/functions.php
r2587148 r3044506 1 1 <?php 2 /** 3 * Utility Functions. 4 * 5 * @package StorePress\TwoCheckoutPaymentGateway; 6 * @since 1.0.0 7 */ 2 8 3 defined( 'ABSPATH' ) or die( 'Keep Silent' );9 namespace StorePress\TwoCheckoutPaymentGateway; 4 10 5 add_filter( 'woocommerce_no_available_payment_methods_message', function ( $no_gateways_message ) { 6 7 $pro_url = 'https://getwooplugins.com/plugins/woocommerce-2checkout/?utm_source=woo-2checkout-user&utm_medium=checkout-page&utm_campaign=woo-2checkout'; 8 $pro_text = esc_html__( 'Payment Gateway - 2Checkout for WooCommerce - Pro ', 'woo-2checkout' ); 9 $pro_link = sprintf( '<a target="_blank" href="%s">%s</a>', $pro_url, $pro_text ); 10 $no_gateways_message = '<strong>' . sprintf( esc_html__( 'Upgrade to %s to get WooCommerce Subscriptions payments, issue refunds from backend, inline popup checkout and more.', 'woo-2checkout' ), $pro_link ) . '</strong>'; 11 12 return $no_gateways_message; 13 } ); 11 defined( 'ABSPATH' ) || die( 'Keep Silent' ); -
woo-2checkout/trunk/languages/woo-2checkout.pot
r2587148 r3044506 1 # Copyright (C) 202 1 Payment Gateway - 2Checkout for WooCommerce2 # This file is distributed under the same license as the Payment Gateway - 2Checkout for WooCommerce package.1 # Copyright (C) 2024 Emran Ahmed 2 # This file is distributed under the GPL v3 or later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Payment Gateway - 2Checkout for WooCommerce\n" 5 "Project-Id-Version: Payment Gateway - 2Checkout for WooCommerce 3.0.0\n" 6 "Report-Msgid-Bugs-To: https://getwooplugins.com/new-ticket/\n" 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 8 "Language-Team: LANGUAGE <LL@li.org>\n" 6 9 "MIME-Version: 1.0\n" 7 10 "Content-Type: text/plain; charset=UTF-8\n" 8 11 "Content-Transfer-Encoding: 8bit\n" 9 "Language-Team: Emran Ahmed\n" 10 "X-Poedit-Basepath: ..\n" 11 "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" 12 "X-Poedit-SearchPath-0: .\n" 13 "X-Poedit-SearchPathExcluded-0: *.js\n" 14 "X-Poedit-SourceCharset: UTF-8\n" 15 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 16 17 #: ../includes/class-woo-2checkout-gateway.php:23 12 "POT-Creation-Date: 2024-03-03T14:56:24+00:00\n" 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.10.0\n" 15 "language-team: LANGUAGE <EMAIL@ADDRESS>\n" 16 "X-Domain: woo-2checkout\n" 17 18 #. Plugin Name of the plugin 19 #: woo-2checkout.php 20 msgid "Payment Gateway - 2Checkout for WooCommerce" 21 msgstr "" 22 23 #. Plugin URI of the plugin 24 #: woo-2checkout.php 25 msgid "https://wordpress.org/plugins/woo-2checkout/" 26 msgstr "" 27 28 #. Description of the plugin 29 #: woo-2checkout.php 30 msgid "2Checkout Payment Gateway for WooCommerce. Requires WooCommerce 5.5+" 31 msgstr "" 32 33 #. Author of the plugin 34 #: woo-2checkout.php 35 msgid "Emran Ahmed" 36 msgstr "" 37 38 #. Author URI of the plugin 39 #: woo-2checkout.php 40 msgid "https://getwooplugins.com/" 41 msgstr "" 42 43 #: includes/Common.php:206 44 msgid "Unserializing instances of this class is forbidden." 45 msgstr "" 46 47 #: includes/ConvertPlus/ConvertPlus_Block.php:74 48 #: includes/Payment_Gateway.php:102 49 #: includes/Payment_Gateway.php:260 50 #: src/convert-plus-block.js:27 51 msgid "Proceed to 2Checkout" 52 msgstr "" 53 54 #: includes/ConvertPlus/ConvertPlus_Block.php:75 55 #: includes/Payment_Gateway.php:100 56 #: includes/Payment_Gateway.php:245 57 #: src/convert-plus-block.js:23 58 msgid "2Checkout" 59 msgstr "" 60 61 #: includes/ConvertPlus/ConvertPlus_Block.php:76 62 #: includes/Payment_Gateway.php:101 63 #: includes/Payment_Gateway.php:253 64 msgid "Pay via 2Checkout. Accept Credit Cards, PayPal and Debit Cards." 65 msgstr "" 66 67 #. translators: Shipping Method Name 68 #: includes/ConvertPlus/ConvertPlus_Gateway.php:401 69 msgid "Shipping via %s" 70 msgstr "" 71 72 #: includes/ConvertPlus/ConvertPlus_Gateway.php:454 73 msgid "Failed to Generate 2Checkout ConvertPlus URL." 74 msgstr "" 75 76 #. translators: 1: Extended Plugin Name. 2: Extended Plugin Version. 3: Extended Plugin Compatible Version. 77 #: includes/Extended_Plugin_Upgrade_Notice.php:68 78 msgid "You are using an incompatible version of <strong>%1$s - (%2$s)</strong>. Please upgrade to version <strong>%3$s</strong> or upper." 79 msgstr "" 80 81 #: includes/Payment_Gateway.php:90 18 82 msgid "2Checkout Payment Gateway" 19 83 msgstr "" 20 84 21 #: ../includes/class-woo-2checkout-gateway.php:2485 #: includes/Payment_Gateway.php:91 22 86 msgid "2Checkout accept mobile and online payments from customers worldwide." 23 87 msgstr "" 24 88 25 #: ../includes/class-woo-2checkout-gateway.php:33, ../includes/class-woo-2checkout-gateway.php:121 26 msgid "2Checkout" 27 msgstr "" 28 29 #: ../includes/class-woo-2checkout-gateway.php:34, ../includes/class-woo-2checkout-gateway.php:129 30 msgid "Pay via 2Checkout. Accept Credit Cards, PayPal and Debit Cards" 31 msgstr "" 32 33 #: ../includes/class-woo-2checkout-gateway.php:35, ../includes/class-woo-2checkout-gateway.php:136 34 msgid "Proceed to 2Checkout" 35 msgstr "" 36 37 #: ../includes/class-woo-2checkout-gateway.php:111 89 #. translators: Demo mode test payment. %s: Test payment card link. 90 #: includes/Payment_Gateway.php:117 91 msgid "<strong>DEMO MODE ENABLED.</strong> Use a %s" 92 msgstr "" 93 94 #: includes/Payment_Gateway.php:235 38 95 msgid "Enable/Disable" 39 96 msgstr "" 40 97 41 #: ../includes/class-woo-2checkout-gateway.php:11398 #: includes/Payment_Gateway.php:237 42 99 msgid "Enable 2Checkout Payment Gateway" 43 100 msgstr "" 44 101 45 #: ../includes/class-woo-2checkout-gateway.php:118102 #: includes/Payment_Gateway.php:242 46 103 msgid "Title" 47 104 msgstr "" 48 105 49 #: ../includes/class-woo-2checkout-gateway.php:120106 #: includes/Payment_Gateway.php:244 50 107 msgid "This controls the title which the user sees during checkout." 51 108 msgstr "" 52 109 53 #: ../includes/class-woo-2checkout-gateway.php:126110 #: includes/Payment_Gateway.php:250 54 111 msgid "Description" 55 112 msgstr "" 56 113 57 #: ../includes/class-woo-2checkout-gateway.php:128114 #: includes/Payment_Gateway.php:252 58 115 msgid "This controls the description which the user sees during checkout." 59 116 msgstr "" 60 117 61 #: ../includes/class-woo-2checkout-gateway.php:133118 #: includes/Payment_Gateway.php:257 62 119 msgid "Order button text" 63 120 msgstr "" 64 121 65 #: ../includes/class-woo-2checkout-gateway.php:135122 #: includes/Payment_Gateway.php:259 66 123 msgid "Checkout order button text." 67 124 msgstr "" 68 125 69 #: ../includes/class-woo-2checkout-gateway.php:141126 #: includes/Payment_Gateway.php:265 70 127 msgid "Read How to Setup" 71 128 msgstr "" 72 129 73 #: ../includes/class-woo-2checkout-gateway.php:148130 #: includes/Payment_Gateway.php:271 74 131 msgid "Merchant Code" 75 132 msgstr "" 76 133 77 #: ../includes/class-woo-2checkout-gateway.php:152 134 #. translators: Webhook URL 135 #: includes/Payment_Gateway.php:275 78 136 msgid "Please enter 2Checkout <strong>Merchant Code</strong> from <a target=\"_blank\" href=\"%s\">Integrations > Webhooks & API > API Section</a>." 79 137 msgstr "" 80 138 81 #: ../includes/class-woo-2checkout-gateway.php:156139 #: includes/Payment_Gateway.php:279 82 140 msgid "Secret Key" 83 141 msgstr "" 84 142 85 #: ../includes/class-woo-2checkout-gateway.php:158 143 #. translators: Webhook URL 144 #: includes/Payment_Gateway.php:281 86 145 msgid "Please enter 2Checkout <strong>Secret Key</strong> from <a target=\"_blank\" href=\"%s\">Integrations > Webhooks & API > API Section</a>" 87 146 msgstr "" 88 147 89 #: ../includes/class-woo-2checkout-gateway.php:164148 #: includes/Payment_Gateway.php:287 90 149 msgid "Buy Link Secret Word" 91 150 msgstr "" 92 151 93 #: ../includes/class-woo-2checkout-gateway.php:166 152 #. translators: Webhook URL 153 #: includes/Payment_Gateway.php:289 94 154 msgid "Please enter 2Checkout <strong>Buy link secret word</strong> from <a target=\"_blank\" href=\"%s\">Integrations > Webhooks & API > Secret word</a> section" 95 155 msgstr "" 96 156 97 #: ../includes/class-woo-2checkout-gateway.php:172157 #: includes/Payment_Gateway.php:295 98 158 msgid "Demo Mode" 99 159 msgstr "" 100 160 101 #: ../includes/class-woo-2checkout-gateway.php:174161 #: includes/Payment_Gateway.php:297 102 162 msgid "Enable Demo Mode" 103 163 msgstr "" 104 164 105 #: ../includes/class-woo-2checkout-gateway.php:176165 #: includes/Payment_Gateway.php:299 106 166 msgid "This mode allows you to test your setup to make sure everything works as expected without take real payment." 107 167 msgstr "" 108 168 109 #: ../includes/class-woo-2checkout-gateway.php:180169 #: includes/Payment_Gateway.php:303 110 170 msgid "Debug Log" 111 171 msgstr "" 112 172 113 #: ../includes/class-woo-2checkout-gateway.php:182173 #: includes/Payment_Gateway.php:305 114 174 msgid "Enable Logging" 115 175 msgstr "" 116 176 117 #: ../includes/class-woo-2checkout-gateway.php:184 177 #. translators: WooCommerce Log URL 178 #: includes/Payment_Gateway.php:307 118 179 msgid "Log 2Checkout events, <strong>DON'T ALWAYS ENABLE THIS.</strong> You can check this log in %s." 119 180 msgstr "" 120 181 121 #: ../includes/class-woo-2checkout-gateway.php:184 182 #. translators: WooCommerce Log URL 183 #: includes/Payment_Gateway.php:307 122 184 msgid "System Status > Logs" 123 185 msgstr "" 124 186 125 #: ../includes/class-woo-2checkout-gateway.php:189187 #: includes/Payment_Gateway.php:311 126 188 msgid "Gateway Icon Style" 127 189 msgstr "" 128 190 129 #: ../includes/class-woo-2checkout-gateway.php:192191 #: includes/Payment_Gateway.php:314 130 192 msgid "Choose Gateway a Icon Style" 131 193 msgstr "" 132 194 133 #: ../includes/class-woo-2checkout-gateway.php:194195 #: includes/Payment_Gateway.php:316 134 196 msgid "Dark" 135 197 msgstr "" 136 198 137 #: ../includes/class-woo-2checkout-gateway.php:195199 #: includes/Payment_Gateway.php:317 138 200 msgid "Light" 139 201 msgstr "" 140 202 141 #: ../includes/class-woo-2checkout-gateway.php:201203 #: includes/Payment_Gateway.php:323 142 204 msgid "Gateway Icon Width" 143 205 msgstr "" 144 206 145 #: ../includes/class-woo-2checkout-gateway.php:203207 #: includes/Payment_Gateway.php:325 146 208 msgid "Gateway Icon Width in %. Limit: 1-100" 147 209 msgstr "" 148 210 149 #: ../includes/class-woo-2checkout-gateway.php:219 150 msgid "Standard Checkout ( Process on 2Checkout site )" 151 msgstr "" 152 153 #: ../includes/class-woo-2checkout-gateway.php:220 211 #: includes/Payment_Gateway.php:336 212 #: includes/Payment_Gateway.php:339 213 msgid "Choose checkout type" 214 msgstr "" 215 216 #: includes/Payment_Gateway.php:341 217 msgid "Standard Checkout ( Process on 2Checkout Site )" 218 msgstr "" 219 220 #: includes/Payment_Gateway.php:342 154 221 msgid "Popup After Checkout - Inline Checkout - PRO FEATURE" 155 222 msgstr "" 156 223 157 #: ../includes/class-woo-2checkout-gateway.php:221224 #: includes/Payment_Gateway.php:343 158 225 msgid "Popup During Checkout - Inline Checkout - PRO FEATURE" 159 226 msgstr "" 160 227 161 #: ../includes/class-woo-2checkout-gateway.php:222228 #: includes/Payment_Gateway.php:344 162 229 msgid "On Page Credit Card Only - PRO FEATURE" 163 230 msgstr "" 164 231 165 #: ../includes/class-woo-2checkout-gateway.php:273 232 #. translators: %s: WebHook link. 233 #: includes/Payment_Gateway.php:421 166 234 msgid "<strong>Webhook endpoint: </strong> <code style=\"background-color:#ddd;\">%s</code> to your <a href=\"https://secure.2checkout.com/cpanel/ipn_settings.php\" target=\"_blank\">2Checkout IPN settings</a>" 167 235 msgstr "" 168 236 169 #: ../includes/class-woo-2checkout-gateway.php:516237 #: includes/Payment_Gateway.php:746 170 238 msgid "Item" 171 239 msgstr "" 172 240 173 #: ../includes/class-woo-2checkout-gateway.php:682 174 msgid "Shipping via %s" 175 msgstr "" 176 177 #: ../includes/class-woo-2checkout-gateway.php:884, ../includes/class-woo-2checkout-gateway.php:888 241 #: includes/Payment_Gateway.php:778 178 242 msgid "Payment Gateway - 2Checkout for WooCommerce disabled" 179 243 msgstr "" 180 244 181 #: ../includes/class-woo-2checkout-gateway.php:884245 #: includes/Payment_Gateway.php:778 182 246 msgid "You must fill the \"Merchant Code\" and the \"Secret Key\" and \"Buy Link Secret Word\" fields." 183 247 msgstr "" 184 248 185 #: ../includes/class-woo-2checkout-gateway.php:888 249 #: includes/Payment_Gateway.php:787 250 msgid "Billing Currency not supported. Payment Gateway - 2Checkout for WooCommerce disabled" 251 msgstr "" 252 253 #: includes/Payment_Gateway.php:787 186 254 msgid "2Checkout does not support your store currency." 187 255 msgstr "" 188 256 189 #: ../includes/class-woo-2checkout-gateway.php:896190 msgid " <strong>DEMO MODE ENABLED.</strong> Use a %s"191 msgstr "" 192 193 #: ../includes/functions.php:8257 #: includes/Payment_Gateway.php:812 258 msgid "Should override on child class." 259 msgstr "" 260 261 #: includes/Plugin.php:177 194 262 msgid "Payment Gateway - 2Checkout for WooCommerce - Pro " 195 263 msgstr "" 196 264 197 #: ../includes/functions.php:10 198 msgid "Upgrade to %s to get WooCommerce Subscriptions payments, issue refunds from backend, inline popup checkout and more." 199 msgstr "" 200 201 #: ../woo-2checkout.php:134 265 #. translators: %s: Pro version link. 266 #: includes/Plugin.php:181 267 msgid "Upgrade to %s to get WooCommerce Subscriptions payments, issue refunds from wp admin, inline popup checkout and more." 268 msgstr "" 269 270 #: includes/Plugin.php:480 202 271 msgid "Settings" 203 272 msgstr "" 204 273 205 #: ../woo-2checkout.php:150 206 msgid "Currently, you are using older version of WooCommerce. It's recommended to use latest version of WooCommerce to work with %s." 207 msgstr "" 208 209 #: ../woo-2checkout.php:150 210 msgid "WooCommerce 2Checkout Payment Gateway" 211 msgstr "" 212 213 #: ../woo-2checkout.php:158 214 msgid "Please check PHP version requirement." 215 msgstr "" 216 217 #: ../woo-2checkout.php:160 218 msgid "It's required to use latest version of PHP to use <strong>Payment Gateway - 2Checkout for WooCommerce</strong>." 219 msgstr "" 220 221 #: ../woo-2checkout.php:172 274 #: woo-2checkout.php:83 222 275 msgid "WooCommerce" 223 276 msgstr "" 224 277 225 #: ../woo-2checkout.php:180226 msgid "<strong>Payment Gateway - 2Checkout for WooCommerce</strong> is a payment gateway plugin of "227 msgstr "" 228 229 #: ../woo-2checkout.php:241230 msgid " Read Documentation"231 msgstr "" 232 233 #: ../woo-2checkout.php:242234 msgid " Facing issue?"235 msgstr "" 236 237 #: ../woo-2checkout.php:242238 msgid " Please open a ticket."239 msgstr "" 278 #: woo-2checkout.php:95 279 msgid "<strong>Payment Gateway - 2Checkout for WooCommerce</strong> is an add-on of " 280 msgstr "" 281 282 #: src/convert-plus-block.js:89 283 msgid "DEMO MODE ENABLED." 284 msgstr "" 285 286 #: src/convert-plus-block.js:91 287 msgid "Use a" 288 msgstr "" 289 290 #: src/convert-plus-block.js:98 291 msgid "test payment cards" 292 msgstr "" -
woo-2checkout/trunk/woo-2checkout.php
r2587148 r3044506 1 1 <?php 2 2 /** 3 * Plugin Name: Payment Gateway - 2Checkout for WooCommerce 4 * Plugin URI: https://wordpress.org/plugins/woo-2checkout/ 5 * Description: 2Checkout Payment Gateway for WooCommerce. Requires WooCommerce 5.5+ 6 * Author: Emran Ahmed 7 * Version: 2.0.7 8 * Domain Path: /languages 9 * Requires PHP: 7.0 10 * Requires at least: 5.5 11 * Tested up to: 5.8 12 * WC requires at least: 5.2 13 * WC tested up to: 5.6 14 * Text Domain: woo-2checkout 15 * Author URI: https://getwooplugins.com/ 3 * Payment Gateway - 2Checkout for WooCommerce 4 * 5 * @package StorePress\PaymentGateway 6 * 7 * @wordpress-plugin 8 * Plugin Name: Payment Gateway - 2Checkout for WooCommerce 9 * Plugin URI: https://wordpress.org/plugins/woo-2checkout/ 10 * Description: 2Checkout Payment Gateway for WooCommerce. Requires WooCommerce 5.5+ 11 * Author: Emran Ahmed 12 * Version: 3.0.0 13 * Requires PHP: 7.4 14 * Requires at least: 6.1 15 * Tested up to: 6.4 16 * 17 * WC requires at least: 8.1 18 * WC tested up to: 8.6 19 * Text Domain: woo-2checkout 20 * Author URI: https://getwooplugins.com/ 21 * License: GPL v3 or later 22 * License URI: https://www.gnu.org/licenses/gpl-3.0.html 23 * Domain Path: /languages 16 24 */ 17 25 18 defined( 'ABSPATH' ) ordie( 'Keep Silent' );26 defined( 'ABSPATH' ) || die( 'Keep Silent' ); 19 27 20 if ( ! class_exists( 'Woo_2Checkout' ) ): 28 use StorePress\TwoCheckoutPaymentGateway\Plugin; 21 29 22 final class Woo_2Checkout { 30 if ( ! defined( 'STOREPRESS_TWO_CHECKOUT_PLUGIN_FILE' ) ) { 31 define( 'STOREPRESS_TWO_CHECKOUT_PLUGIN_FILE', __FILE__ ); 32 } 23 33 24 protected $_version = '2.0.7'; 25 protected static $_instance = null; 34 if ( ! defined( 'STOREPRESS_TWO_CHECKOUT_COMPATIBLE_EXTENDED_VERSION' ) ) { 35 define( 'STOREPRESS_TWO_CHECKOUT_COMPATIBLE_EXTENDED_VERSION', '3.0.0' ); 36 } 26 37 27 public static function instance() { 28 if ( is_null( self::$_instance) ) {29 self::$_instance = new self();30 }38 // Include the Plugin class. 39 if ( ! class_exists( '\StorePress\TwoCheckoutPaymentGateway\Plugin' ) ) { 40 require_once plugin_dir_path( __FILE__ ) . 'includes/Plugin.php'; 41 } 31 42 32 return self::$_instance; 43 /** 44 * Get compatible version of extended plugin. 45 * 46 * @return string 47 */ 48 function woo_2checkout_compatible_pro_version(): string { 49 return constant( 'STOREPRESS_TWO_CHECKOUT_COMPATIBLE_EXTENDED_VERSION' ); 50 } 51 52 /** 53 * The main function that returns the Plugin class 54 * 55 * @return Plugin|false 56 * @since 2.1.0 57 */ 58 function woo_2checkout() { 59 // Include the main class. 60 61 if ( ! class_exists( 'WooCommerce' ) ) { 62 return false; 63 } 64 65 if ( function_exists( 'woo_2checkout_pro' ) ) { 66 return woo_2checkout_pro(); 67 } 68 69 return Plugin::instance(); 70 } 71 72 // Get the plugin running. 73 add_action( 'plugins_loaded', 'woo_2checkout' ); 74 75 /** 76 * Admin Notice for required plugin. 77 * 78 * @return void 79 */ 80 function woo_2checkout_requirements_notice() { 81 if ( ! class_exists( 'WooCommerce' ) ) { 82 83 $text = esc_html__( 'WooCommerce', 'woo-2checkout' ); 84 85 $plugin_args = array( 86 'tab' => 'plugin-information', 87 'plugin' => 'woocommerce', 88 'TB_iframe' => 'true', 89 'width' => '640', 90 'height' => '500', 91 ); 92 93 $link = add_query_arg( $plugin_args, admin_url( 'plugin-install.php' ) ); 94 95 $message = __( '<strong>Payment Gateway - 2Checkout for WooCommerce</strong> is an add-on of ', 'woo-2checkout' ); 96 97 printf( '<div class="%1$s"><p>%2$s <a class="thickbox open-plugin-details-modal" href="%3$s"><strong>%4$s</strong></a></p></div>', 'notice notice-error', wp_kses_post( $message ), esc_url( $link ), esc_html( $text ) ); 98 } 99 } 100 101 add_action( 'admin_notices', 'woo_2checkout_requirements_notice' ); 102 103 // Deactivate too old extended plugin. 104 add_action( 105 'admin_init', 106 function () { 107 108 $plugin_file = 'woo-2checkout-pro/woo-2checkout-pro.php'; 109 110 $file = wp_normalize_path( $plugin_file ); 111 $plugin = plugin_basename( $file ); 112 113 $abs_file = trailingslashit( WP_PLUGIN_DIR ) . $plugin; 114 115 if ( ! file_exists( $abs_file ) ) { 116 return; 33 117 } 34 118 35 public function __construct() {36 $this->constants();37 $this->language();38 $this->includes(); 39 $this->hooks();40 do_action( 'woo_2checkout_loaded', $this );119 $data = get_plugin_data( $abs_file ); 120 $required_version = woo_2checkout_compatible_pro_version(); 121 $current_version = sanitize_text_field( $data['Version'] ); 122 123 if ( is_plugin_inactive( $plugin_file ) ) { 124 return; 41 125 } 42 126 43 public function define( $name, $value, $case_insensitive = false ) { 44 if ( ! defined( $name ) ) { 45 define( $name, $value, $case_insensitive ); 46 } 127 // Yes. Compatible. 128 if ( version_compare( $current_version, $required_version, '>=' ) ) { 129 return; 47 130 } 48 131 49 public function constants() { 50 $this->define( 'WOO_2CO_PLUGIN_URI', plugin_dir_url( __FILE__ ) ); 51 $this->define( 'WOO_2CO_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); 52 $this->define( 'WOO_2CO_VERSION', $this->version() ); 53 $this->define( 'WOO_2CO_PLUGIN_INCLUDE_PATH', trailingslashit( plugin_dir_path( __FILE__ ) . 'includes' ) ); 54 $this->define( 'WOO_2CO_PLUGIN_DIRNAME', dirname( plugin_basename( __FILE__ ) ) ); 55 $this->define( 'WOO_2CO_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); 56 $this->define( 'WOO_2CO_PLUGIN_FILE', __FILE__ ); 57 $this->define( 'WOO_2CO_IMAGES_URI', trailingslashit( plugin_dir_url( __FILE__ ) . 'images' ) ); 58 $this->define( 'WOO_2CO_ASSETS_URI', trailingslashit( plugin_dir_url( __FILE__ ) . 'assets' ) ); 59 } 60 61 public function includes() { 62 if ( $this->is_required_php_version() && $this->is_wc_active() ) { 63 require_once $this->include_path( 'class-woo-2checkout-gateway.php' ); 64 require_once $this->include_path( 'class-woo-2checkout-gateway-api.php' ); 65 require_once $this->include_path( 'functions.php' ); 66 } 67 } 68 69 public function is_pro_active() { 70 return class_exists( 'Woo_2Checkout_Pro' ); 71 } 72 73 public function get_pro_link( $medium = 'go-pro' ) { 74 75 $affiliate_id = apply_filters( 'gwp_affiliate_id', 0 ); 76 77 $link_args = array(); 78 79 if ( ! empty( $affiliate_id ) ) { 80 $link_args['ref'] = esc_html( $affiliate_id ); 81 } 82 83 $link_args['utm_source'] = 'wp-admin-plugins'; 84 $link_args['utm_medium'] = esc_attr( $medium ); 85 $link_args['utm_campaign'] = 'woo-2checkout'; 86 $link_args['utm_term'] = sanitize_title( $this->get_parent_theme_name() ); 87 88 $link_args = apply_filters( 'wvs_get_pro_link_args', $link_args ); 89 90 return esc_url( add_query_arg( $link_args, 'https://getwooplugins.com/plugins/woocommerce-2checkout/' ) ); 91 } 92 93 public function include_path( $file ) { 94 $file = ltrim( $file, '/' ); 95 96 return WOO_2CO_PLUGIN_INCLUDE_PATH . $file; 97 } 98 99 public function hooks() { 100 add_action( 'admin_notices', array( $this, 'php_requirement_notice' ) ); 101 add_action( 'admin_notices', array( $this, 'wc_requirement_notice' ) ); 102 add_action( 'admin_notices', array( $this, 'wc_version_requirement_notice' ) ); 103 add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 ); 104 105 if ( $this->is_required_php_version() && $this->is_wc_active() ) { 106 107 add_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateway' ) ); 108 109 add_filter( 'plugin_action_links_' . $this->basename(), array( $this, 'plugin_action_links' ) ); 110 } 111 } 112 113 public function add_gateway( $methods ) { 114 115 $methods[] = $this->get_gateway_class_name(); 116 117 return $methods; 118 } 119 120 public function get_gateway_class_name() { 121 return apply_filters( 'woo_2checkout_get_gateway_class_name', 'Woo_2Checkout_Gateway', $this ); 122 } 123 124 public function plugin_action_links( $links ) { 125 126 $new_links = array(); 127 128 $settings_link = esc_url( add_query_arg( array( 129 'page' => 'wc-settings', 130 'tab' => 'checkout', 131 'section' => 'woo-2checkout' 132 ), admin_url( 'admin.php' ) ) ); 133 134 $new_links['settings'] = sprintf( '<a href="%1$s" title="%2$s">%2$s</a>', $settings_link, esc_attr__( 'Settings', 'woo-2checkout' ) ); 135 136 return array_merge( $links, $new_links ); 137 } 138 139 public function is_required_php_version() { 140 return version_compare( PHP_VERSION, '5.6.0', '>=' ); 141 } 142 143 public function is_required_wc_version() { 144 return version_compare( WC_VERSION, '3.5', '>' ); 145 } 146 147 public function wc_version_requirement_notice() { 148 if ( $this->is_wc_active() && ! $this->is_required_wc_version() ) { 149 $class = 'notice notice-error'; 150 $message = sprintf( esc_html__( "Currently, you are using older version of WooCommerce. It's recommended to use latest version of WooCommerce to work with %s.", 'woo-2checkout' ), esc_html__( 'WooCommerce 2Checkout Payment Gateway', 'woo-2checkout' ) ); 151 printf( '<div class="%1$s"><p><strong>%2$s</strong></p></div>', $class, $message ); 152 } 153 } 154 155 public function php_requirement_notice() { 156 if ( ! $this->is_required_php_version() ) { 157 $class = 'notice notice-error'; 158 $text = esc_html__( 'Please check PHP version requirement.', 'woo-2checkout' ); 159 $link = esc_url( 'https://docs.woocommerce.com/document/server-requirements/' ); 160 $message = wp_kses( __( "It's required to use latest version of PHP to use <strong>Payment Gateway - 2Checkout for WooCommerce</strong>.", 'woo-2checkout' ), array( 'strong' => array() ) ); 161 162 printf( '<div class="%1$s"><p>%2$s <a target="_blank" href="%3$s">%4$s</a></p></div>', $class, $message, $link, $text ); 163 } 164 } 165 166 public function wc_requirement_notice() { 167 168 if ( ! $this->is_wc_active() ) { 169 170 $class = 'notice notice-error'; 171 172 $text = esc_html__( 'WooCommerce', 'woo-2checkout' ); 173 $link = esc_url( add_query_arg( array( 174 'tab' => 'plugin-information', 175 'plugin' => 'woocommerce', 176 'TB_iframe' => 'true', 177 'width' => '640', 178 'height' => '500', 179 ), admin_url( 'plugin-install.php' ) ) ); 180 $message = wp_kses( __( "<strong>Payment Gateway - 2Checkout for WooCommerce</strong> is a payment gateway plugin of ", 'woo-2checkout' ), array( 'strong' => array() ) ); 181 182 printf( '<div class="%1$s"><p>%2$s <a class="thickbox open-plugin-details-modal" href="%3$s"><strong>%4$s</strong></a></p></div>', $class, $message, $link, $text ); 183 } 184 } 185 186 public function language() { 187 load_plugin_textdomain( 'woo-2checkout', false, trailingslashit( WOO_2CO_PLUGIN_DIRNAME ) . 'languages' ); 188 } 189 190 public function is_wc_active() { 191 return class_exists( 'WooCommerce' ); 192 } 193 194 public function basename() { 195 return WOO_2CO_PLUGIN_BASENAME; 196 } 197 198 public function dirname() { 199 return WOO_2CO_PLUGIN_DIRNAME; 200 } 201 202 public function version() { 203 return esc_attr( $this->_version ); 204 } 205 206 public function plugin_path() { 207 return untrailingslashit( plugin_dir_path( __FILE__ ) ); 208 } 209 210 public function plugin_uri() { 211 return untrailingslashit( plugins_url( '/', __FILE__ ) ); 212 } 213 214 public function images_uri( $file ) { 215 $file = ltrim( $file, '/' ); 216 217 return WOO_2CO_IMAGES_URI . $file; 218 } 219 220 public function assets_uri( $file ) { 221 $file = ltrim( $file, '/' ); 222 223 return WOO_2CO_ASSETS_URI . $file; 224 } 225 226 public function plugin_row_meta( $links, $file ) { 227 if ( $file == $this->basename() ) { 228 229 $report_url = add_query_arg( array( 230 'utm_source' => 'wp-admin-plugins', 231 'utm_medium' => 'row-meta-link', 232 'utm_campaign' => 'woo-2checkout' 233 ), 'https://getwooplugins.com/tickets/' ); 234 235 $documentation_url = add_query_arg( array( 236 'utm_source' => 'wp-admin-plugins', 237 'utm_medium' => 'row-meta-link', 238 'utm_campaign' => 'woo-2checkout' 239 ), 'https://getwooplugins.com/documentation/woocommerce-2checkout/' ); 240 241 $row_meta['documentation'] = sprintf( '<a target="_blank" href="%1$s" title="%2$s">%2$s</a>', esc_url( $documentation_url ), esc_html__( 'Read Documentation', 'woo-2checkout' ) ); 242 $row_meta['issues'] = sprintf( '%2$s <a target="_blank" href="%1$s">%3$s</a>', esc_url( $report_url ), esc_html__( 'Facing issue?', 'woo-2checkout' ), '<span style="color: red">' . esc_html__( 'Please open a ticket.', 'woo-2checkout' ) . '</span>' ); 243 244 return array_merge( $links, $row_meta ); 245 } 246 247 return (array) $links; 248 } 249 250 public function get_theme_name() { 251 return wp_get_theme()->get( 'Name' ); 252 } 253 254 public function get_theme_dir() { 255 return strtolower( basename( get_template_directory() ) ); 256 } 257 258 public function get_parent_theme_name() { 259 return wp_get_theme( get_template() )->get( 'Name' ); 260 } 261 262 public function get_parent_theme_dir() { 263 return strtolower( basename( get_stylesheet_directory() ) ); 264 } 265 } 266 267 function woo_2checkout() { 268 return Woo_2Checkout::instance(); 269 } 270 271 add_action( 'plugins_loaded', 'woo_2checkout' ); 272 273 endif; 132 // Deactivate the plugin silently, Prevent deactivation hooks from running. 133 deactivate_plugins( $plugin_file, true ); 134 }, 135 12 136 );
Note: See TracChangeset
for help on using the changeset viewer.