Changeset 2418984
- Timestamp:
- 11/15/2020 02:53:24 PM (4 years ago)
- Location:
- simple-stripe-checkout/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
simple-stripe-checkout/trunk/readme.txt
r2414739 r2418984 4 4 Requires at least: 4.9.13 5 5 Tested up to: 5.5 6 Stable tag: 1.1. 06 Stable tag: 1.1.1 7 7 License: GPL v3 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 44 44 = 1.1.0 = 45 45 * 2020-11-08 定期支払に対応 46 = 1.1.1 = 47 * 2020-11-15 商品一覧のデフォルトの並び順を、商品コードの降順に変更 48 * 2020-11-15 サイトネットワークで有効化した場合でも、各種固定ページを自動生成できるよう修正 -
simple-stripe-checkout/trunk/simple-stripe-checkout.php
r2414739 r2418984 14 14 } 15 15 16 register_activation_hook(__FILE__, function( ) {17 18 // 固定ページ「決済完了」が未登録の場合19 if (!get_page_by_path(SimpleStripeCheckout::SLUG__CHECKEDOUT)) {20 // 決済完了の固定ページを作成21 $page_id = wp_insert_post(array(22 'post_name' => SimpleStripeCheckout::SLUG__CHECKEDOUT,23 'post_author' => 1,24 'post_title' => '決済完了',25 'post_content' => 'お支払いが完了しました。16 register_activation_hook(__FILE__, function($network_wide) { 17 $initialize_pages = function($name) { 18 // 固定ページ「決済完了」が未登録の場合 19 if (!get_page_by_path(SimpleStripeCheckout::SLUG__CHECKEDOUT)) { 20 // 決済完了の固定ページを作成 21 $page_id = wp_insert_post(array( 22 'post_name' => SimpleStripeCheckout::SLUG__CHECKEDOUT, 23 'post_author' => 1, 24 'post_title' => '決済完了', 25 'post_content' => 'お支払いが完了しました。 26 26 27 27 ありがとうございます。 28 28 引き続きよろしくお願いいたします。', 29 'post_parent' => 0, 30 'post_status' => 'publish', 31 'post_type' => 'page' 32 )); 33 get_pages('include=' . $page_id); 34 } 35 36 // 固定ページ「キャンセル完了」が未登録の場合 37 if (!get_page_by_path(SimpleStripeCheckout::SLUG__CANCEL)) { 38 // キャンセル完了の固定ページを作成 39 $page_id = wp_insert_post(array( 40 'post_name' => SimpleStripeCheckout::SLUG__CANCEL, 41 'post_author' => 1, 42 'post_title' => 'キャンセル完了', 43 'post_content' => 'お支払いのキャンセルを承りました。 29 'post_parent' => 0, 30 'post_status' => 'publish', 31 'post_type' => 'page' 32 )); 33 get_pages('include=' . $page_id); 34 } 35 // 固定ページ「キャンセル完了」が未登録の場合 36 if (!get_page_by_path(SimpleStripeCheckout::SLUG__CANCEL)) { 37 // キャンセル完了の固定ページを作成 38 $page_id = wp_insert_post(array( 39 'post_name' => SimpleStripeCheckout::SLUG__CANCEL, 40 'post_author' => 1, 41 'post_title' => 'キャンセル完了', 42 'post_content' => 'お支払いのキャンセルを承りました。 44 43 45 44 ありがとうございます。 46 45 またの機会がありましたらよろしくお願いいたします。', 47 'post_parent' => 0, 48 'post_status' => 'publish', 49 'post_type' => 'page' 50 )); 51 get_pages('include=' . $page_id); 52 } 53 54 // 固定ページ「決済確定完了」が未登録の場合 55 if (!get_page_by_path(SimpleStripeCheckout::SLUG__CAPTURE_COMPLETE)) { 56 // 決済確定完了の固定ページを作成 57 $page_id = wp_insert_post(array( 58 'post_name' => SimpleStripeCheckout::SLUG__CAPTURE_COMPLETE, 59 'post_author' => 1, 60 'post_title' => '決済確定完了', 61 'post_content' => '決済が確定し、お支払いが完了しました。 46 'post_parent' => 0, 47 'post_status' => 'publish', 48 'post_type' => 'page' 49 )); 50 get_pages('include=' . $page_id); 51 } 52 // 固定ページ「決済確定完了」が未登録の場合 53 if (!get_page_by_path(SimpleStripeCheckout::SLUG__CAPTURE_COMPLETE)) { 54 // 決済確定完了の固定ページを作成 55 $page_id = wp_insert_post(array( 56 'post_name' => SimpleStripeCheckout::SLUG__CAPTURE_COMPLETE, 57 'post_author' => 1, 58 'post_title' => '決済確定完了', 59 'post_content' => '決済が確定し、お支払いが完了しました。 62 60 63 61 ありがとうございます。 64 62 引き続きよろしくお願いいたします。', 65 'post_parent' => 0, 66 'post_status' => 'publish', 67 'post_type' => 'page' 68 )); 69 get_pages('include=' . $page_id); 70 } 71 72 // 固定ページ「定期支払キャンセル完了」が未登録の場合 73 if (!get_page_by_path(SimpleStripeCheckout::SLUG__CANCELED_SUBSCRIPTION)) { 74 // 定期支払キャンセル完了の固定ページを作成 75 $page_id = wp_insert_post(array( 76 'post_name' => SimpleStripeCheckout::SLUG__CANCELED_SUBSCRIPTION, 77 'post_author' => 1, 78 'post_title' => '定期支払キャンセル完了', 79 'post_content' => 'ご登録いただいていた定期支払いをキャンセルしました。 63 'post_parent' => 0, 64 'post_status' => 'publish', 65 'post_type' => 'page' 66 )); 67 get_pages('include=' . $page_id); 68 } 69 // 固定ページ「定期支払キャンセル完了」が未登録の場合 70 if (!get_page_by_path(SimpleStripeCheckout::SLUG__CANCELED_SUBSCRIPTION)) { 71 // 定期支払キャンセル完了の固定ページを作成 72 $page_id = wp_insert_post(array( 73 'post_name' => SimpleStripeCheckout::SLUG__CANCELED_SUBSCRIPTION, 74 'post_author' => 1, 75 'post_title' => '定期支払キャンセル完了', 76 'post_content' => 'ご登録いただいていた定期支払いをキャンセルしました。 80 77 ご利用ありがとうございました。 81 78 82 79 [gssc-product-name]', 83 'post_parent' => 0, 84 'post_status' => 'publish', 85 'post_type' => 'page' 86 )); 87 get_pages('include=' . $page_id); 88 } 89 80 'post_parent' => 0, 81 'post_status' => 'publish', 82 'post_type' => 'page' 83 )); 84 get_pages('include=' . $page_id); 85 } 86 }; 87 if (is_multisite() && $network_wide) { 88 foreach (get_sites(['fields'=>'ids']) as $blog_id) { 89 switch_to_blog($blog_id); 90 $initialize_pages(); 91 } 92 restore_current_blog(); 93 } 94 else { 95 $initialize_pages(); 96 } 90 97 }); 91 98 … … 219 226 }; 220 227 221 $orderby = isset($_GET['orderby']) ? sanitize_text_field($_GET['orderby']) : ' ';228 $orderby = isset($_GET['orderby']) ? sanitize_text_field($_GET['orderby']) : 'code'; 222 229 $order = isset($_GET['order']) ? sanitize_text_field($_GET['order']) : ''; 223 230 $orderDir = $order === 'asc' ? 1 : -1;
Note: See TracChangeset
for help on using the changeset viewer.