Changeset 2276188
- Timestamp:
- 04/05/2020 03:27:00 AM (5 years ago)
- Location:
- simple-stripe-checkout/trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
simple-stripe-checkout/trunk/readme.txt
r2275585 r2276188 4 4 Requires at least: 4.9.13 5 5 Tested up to: 5.4 6 Stable tag: 1.0. 16 Stable tag: 1.0.2 7 7 License: GPL v3 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 33 33 = 1.0.0 = 34 34 * 2020-03-01 First release 35 = 1.0. 0=35 = 1.0.1 = 36 36 * 2020-04-04 軽微な修正 37 = 1.0.2 = 38 * 2020-04-05 WordPress5.4でStripeの購入ボタンが表示されない問題を修正 -
simple-stripe-checkout/trunk/simple-stripe-checkout.php
r2275585 r2276188 5 5 Plugin URI: https://s-page.biz/plugins/simple-stripe-checkout/ 6 6 Description: 決済プラットフォーム「Stripe」の連携プラグイン 7 Version: 1.0. 17 Version: 1.0.2 8 8 Author: growniche 9 9 Author URI: https://www.growniche.co.jp/ … … 359 359 360 360 /** 361 * このプラグインのスクリプトのハンドル名 362 */ 363 const SCRIPT_HANDLE = self::PLUGIN_ID . '-js'; 364 365 /** 361 366 * CredentialAction(プレフィックス) 362 367 */ … … 1087 1092 // ショートコード処理の前準備 1088 1093 add_action('wp_enqueue_scripts', [$this, 'pre_short_code']); 1094 wp_enqueue_script('jquery' ); 1089 1095 // ショートコード処理を登録 1090 1096 add_shortcode(self::PLUGIN_ID, [$this, 'short_code']); … … 1127 1133 */ 1128 1134 function pre_short_code() { 1129 $data = <<<EOS 1130 jQuery(window).on('load', function() { 1131 jQuery(".gssc-form").each(function(index, element){ 1132 var script = jQuery("<script>"); 1133 script.attr("src", "https://checkout.stripe.com/checkout.js"); 1134 script.addClass("stripe-button"); 1135 script.attr("data-key", jQuery(element).data("key")); 1136 script.attr("data-amount", jQuery(element).data("amount")); 1137 script.attr("data-name", jQuery(element).data("name")); 1138 script.attr("data-description", jQuery(element).data("description")); 1139 script.attr("data-image", "https://stripe.com/img/documentation/checkout/marketplace.png"); 1140 script.attr("data-locale", "auto"); 1141 script.attr("data-currency", jQuery(element).data("currency")); 1142 script.attr("data-zip-code", "false"); 1143 script.attr("data-allow-remember-me", "false"); 1144 script.attr("data-label", jQuery(element).data("label")); 1145 script.appendTo(element); 1146 }); 1147 }); 1148 EOS; 1149 wp_add_inline_script('jquery-core', $data ); 1135 wp_enqueue_script(self::SCRIPT_HANDLE, plugin_dir_url(__FILE__) . self::PLUGIN_ID . '.js'); 1150 1136 } 1151 1137
Note: See TracChangeset
for help on using the changeset viewer.