Simple Membership - Version 3.9.7

Version Description

  • Added minor improvements to the get_current_page_url() function to increase compatibility with some servers.
  • The mini login shortcode will also work with the "Enable Redirect to Last Page" feature from the after login redirection addon.
  • Updated the Japanese language translation file.
  • Minor Stripe SCA button related enhancements (added filter).
  • Stripe buy now transactions (One-time payments) will now have a link to the user "profile" in the "payments" menu.
  • Chinese language file name changed from zh_Hans to zh_HK.
Download this release

Release Info

Developer wp.insider
Plugin Icon 128x128 Simple Membership
Version 3.9.7
Comparing to
See all releases

Code changes from version 3.9.5 to 3.9.7

classes/admin-includes/class.swpm-payments-list-table.php CHANGED
@@ -90,6 +90,7 @@ class SWPMPaymentsListTable extends WP_List_Table {
90
  'subscr_id' => SwpmUtils::_( 'Subscriber ID' ),
91
  'payment_amount' => SwpmUtils::_( 'Amount' ),
92
  'membership_level' => SwpmUtils::_( 'Membership Level' ),
 
93
  );
94
  return $columns;
95
  }
90
  'subscr_id' => SwpmUtils::_( 'Subscriber ID' ),
91
  'payment_amount' => SwpmUtils::_( 'Amount' ),
92
  'membership_level' => SwpmUtils::_( 'Membership Level' ),
93
+ 'status' => SwpmUtils::_( 'Status/Note' ),
94
  );
95
  return $columns;
96
  }
classes/class.swpm-front-registration.php CHANGED
@@ -148,6 +148,7 @@ class SwpmFrontRegistration extends SwpmRegistration {
148
  $email_act_msg = '<div class="swpm-registration-success-msg">';
149
  $email_act_msg .= SwpmUtils::_( 'You need to confirm your email address. Please check your email and follow instructions to complete your registration.' );
150
  $email_act_msg .= '</div>';
 
151
  $message = array(
152
  'succeeded' => true,
153
  'message' => $email_act_msg,
148
  $email_act_msg = '<div class="swpm-registration-success-msg">';
149
  $email_act_msg .= SwpmUtils::_( 'You need to confirm your email address. Please check your email and follow instructions to complete your registration.' );
150
  $email_act_msg .= '</div>';
151
+ $email_act_msg = apply_filters( 'swpm_registration_email_activation_msg', $email_act_msg );//Can be added to the custom messages addon.
152
  $message = array(
153
  'succeeded' => true,
154
  'message' => $email_act_msg,
classes/class.swpm-installation.php CHANGED
@@ -164,7 +164,7 @@ class SwpmInstallation {
164
  reference varchar(255) NOT NULL default '',
165
  payment_amount varchar(32) NOT NULL default '',
166
  gateway varchar(32) DEFAULT '',
167
- status varchar(16) DEFAULT '',
168
  ip_address varchar(128) default ''
169
  )" . $charset_collate . ";";
170
  dbDelta($sql);
164
  reference varchar(255) NOT NULL default '',
165
  payment_amount varchar(32) NOT NULL default '',
166
  gateway varchar(32) DEFAULT '',
167
+ status varchar(255) DEFAULT '',
168
  ip_address varchar(128) default ''
169
  )" . $charset_collate . ";";
170
  dbDelta($sql);
classes/class.swpm-members.php CHANGED
@@ -450,17 +450,14 @@ class SwpmMembers extends WP_List_Table {
450
  SwpmLog::log_simple_debug( 'Attempting to cancel Stripe Subscription ' . $sub['subscr_id'], true );
451
 
452
  $is_live = get_post_meta( $button_id, 'is_live', true );
453
- if ( $is_live ) {
454
- SwpmLog::log_simple_debug( 'Payment was made in live mode. Using test API key details.', true );
455
- $secret_key = get_post_meta( $button_id, 'stripe_live_secret_key', true ); //Use live API key
456
- } else {
457
- SwpmLog::log_simple_debug( 'Payment was made in sandbox mode. Using test API key details.', true );
458
- $secret_key = get_post_meta( $button_id, 'stripe_test_secret_key', true ); //Use sandbox API key
459
- }
460
  //Include the Stripe library.
461
  SwpmMiscUtils::load_stripe_lib();
462
 
463
- \Stripe\Stripe::setApiKey( $secret_key );
464
 
465
  $error = null;
466
  // Let's try to cancel subscription
450
  SwpmLog::log_simple_debug( 'Attempting to cancel Stripe Subscription ' . $sub['subscr_id'], true );
451
 
452
  $is_live = get_post_meta( $button_id, 'is_live', true );
453
+
454
+ //API Keys
455
+ $api_keys = SwpmMiscUtils::get_stripe_api_keys_from_payment_button( $button_id, $is_live );
456
+
 
 
 
457
  //Include the Stripe library.
458
  SwpmMiscUtils::load_stripe_lib();
459
 
460
+ \Stripe\Stripe::setApiKey( $api_keys['secret'] );
461
 
462
  $error = null;
463
  // Let's try to cancel subscription
classes/class.swpm-settings.php CHANGED
@@ -242,6 +242,63 @@ class SwpmSettings {
242
 
243
  private function tab_2() {
244
  //Register settings sections and fileds for the payment settings tab.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  }
246
 
247
  private function tab_3() {
@@ -788,7 +845,7 @@ class SwpmSettings {
788
  $options = $args['options'];
789
  $default = $args['default'];
790
  $msg = isset( $args['message'] ) ? $args['message'] : '';
791
- $selected = esc_attr( $this->get_value( $item ), $default );
792
  echo "<select name='swpm-settings[" . $item . "]' >";
793
  foreach ( $options as $key => $value ) {
794
  $is_selected = ( $key == $selected ) ? 'selected="selected"' : '';
@@ -825,9 +882,9 @@ class SwpmSettings {
825
  public function textfield_callback( $args ) {
826
  $item = $args['item'];
827
  $msg = isset( $args['message'] ) ? $args['message'] : '';
828
- $text = esc_attr( $this->get_value( $item ) );
829
- echo "<input type='text' name='swpm-settings[" . $item . "]' size='50' value='" . $text . "' />";
830
- echo '<br/><i>' . $msg . '</i>';
831
  }
832
 
833
  public function textfield_long_callback( $args ) {
@@ -1002,12 +1059,29 @@ class SwpmSettings {
1002
  return $output;
1003
  }
1004
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1005
  public function sanitize_tab_3( $input ) {
1006
  if ( empty( $this->settings ) ) {
1007
  $this->settings = (array) get_option( 'swpm-settings' );
1008
  }
1009
- $output = $this->settings;
1010
- $output['reg-complete-mail-subject'] = sanitize_text_field( $input['reg-complete-mail-subject'] );
 
1011
  $output['reg-complete-mail-body'] = $input['reg-complete-mail-body'];
1012
  $output['reg-complete-mail-subject-admin'] = sanitize_text_field( $input['reg-complete-mail-subject-admin'] );
1013
  $output['reg-complete-mail-body-admin'] = $input['reg-complete-mail-body-admin'];
@@ -1025,10 +1099,11 @@ class SwpmSettings {
1025
  $output['email-activation-mail-subject'] = sanitize_text_field( $input['email-activation-mail-subject'] );
1026
  $output['email-activation-mail-body'] = $input['email-activation-mail-body'];
1027
 
1028
- $output['reg-prompt-complete-mail-subject'] = sanitize_text_field( $input['reg-prompt-complete-mail-subject'] );
1029
- $output['reg-prompt-complete-mail-body'] = $input['reg-prompt-complete-mail-body'];
1030
- $output['email-from'] = trim( $input['email-from'] );
1031
- $output['email-enable-html'] = isset( $input['email-enable-html'] ) ? esc_attr( $input['email-enable-html'] ) : '';
 
1032
  $output['enable-admin-notification-after-reg'] = isset( $input['enable-admin-notification-after-reg'] ) ? esc_attr( $input['enable-admin-notification-after-reg'] ) : '';
1033
  $output['admin-notification-email'] = sanitize_text_field( $input['admin-notification-email'] );
1034
  $output['enable-notification-after-manual-user-add'] = isset( $input['enable-notification-after-manual-user-add'] ) ? esc_attr( $input['enable-notification-after-manual-user-add'] ) : '';
242
 
243
  private function tab_2() {
244
  //Register settings sections and fileds for the payment settings tab.
245
+ register_setting( 'swpm-settings-tab-2', 'swpm-settings', array( $this, 'sanitize_tab_2' ) );
246
+ add_settings_section( 'stripe-global-settings', SwpmUtils::_( 'Stripe Global Settings' ), null, 'simple_wp_membership_settings' );
247
+ add_settings_field(
248
+ 'stripe-prefill-member-email',
249
+ SwpmUtils::_( 'Pre-fill Member Email Address' ),
250
+ array( $this, 'checkbox_callback' ),
251
+ 'simple_wp_membership_settings',
252
+ 'stripe-global-settings',
253
+ array(
254
+ 'item' => 'stripe-prefill-member-email',
255
+ 'message' => SwpmUtils::_( 'Pre-fills the email address of the logged-in member on the Stripe checkout form when possible' ),
256
+ )
257
+ );
258
+ add_settings_field(
259
+ 'stripe-test-public-key',
260
+ SwpmUtils::_( 'Test Publishable Key' ),
261
+ array( $this, 'textfield_callback' ),
262
+ 'simple_wp_membership_settings',
263
+ 'stripe-global-settings',
264
+ array(
265
+ 'item' => 'stripe-test-public-key',
266
+ 'message' => SwpmUtils::_( 'Stripe API Test publishable key' ),
267
+ )
268
+ );
269
+ add_settings_field(
270
+ 'stripe-test-secret-key',
271
+ SwpmUtils::_( 'Test Secret Key' ),
272
+ array( $this, 'textfield_callback' ),
273
+ 'simple_wp_membership_settings',
274
+ 'stripe-global-settings',
275
+ array(
276
+ 'item' => 'stripe-test-secret-key',
277
+ 'message' => SwpmUtils::_( 'Stripe API Test secret key' ),
278
+ )
279
+ );
280
+ add_settings_field(
281
+ 'stripe-live-public-key',
282
+ SwpmUtils::_( 'Live Publishable Key' ),
283
+ array( $this, 'textfield_callback' ),
284
+ 'simple_wp_membership_settings',
285
+ 'stripe-global-settings',
286
+ array(
287
+ 'item' => 'stripe-live-public-key',
288
+ 'message' => SwpmUtils::_( 'Stripe API Live publishable key' ),
289
+ )
290
+ );
291
+ add_settings_field(
292
+ 'stripe-live-secret-key',
293
+ SwpmUtils::_( 'Live Secret Key' ),
294
+ array( $this, 'textfield_callback' ),
295
+ 'simple_wp_membership_settings',
296
+ 'stripe-global-settings',
297
+ array(
298
+ 'item' => 'stripe-live-secret-key',
299
+ 'message' => SwpmUtils::_( 'Stripe API Live secret key' ),
300
+ )
301
+ );
302
  }
303
 
304
  private function tab_3() {
845
  $options = $args['options'];
846
  $default = $args['default'];
847
  $msg = isset( $args['message'] ) ? $args['message'] : '';
848
+ $selected = esc_attr( $this->get_value( $item, $default ) );
849
  echo "<select name='swpm-settings[" . $item . "]' >";
850
  foreach ( $options as $key => $value ) {
851
  $is_selected = ( $key == $selected ) ? 'selected="selected"' : '';
882
  public function textfield_callback( $args ) {
883
  $item = $args['item'];
884
  $msg = isset( $args['message'] ) ? $args['message'] : '';
885
+ $text = $this->get_value( $item );
886
+ echo sprintf( '<input type="text" name="swpm-settings[%s]" size="50" value="%s" />', esc_attr( $item ), esc_attr( $text ) );
887
+ echo sprintf( '<p class="description">%s</p>', $msg );
888
  }
889
 
890
  public function textfield_long_callback( $args ) {
1059
  return $output;
1060
  }
1061
 
1062
+ public function sanitize_tab_2( $input ) {
1063
+ if ( empty( $this->settings ) ) {
1064
+ $this->settings = (array) get_option( 'swpm-settings' );
1065
+ }
1066
+ $output = $this->settings;
1067
+
1068
+ $output['stripe-test-public-key'] = sanitize_text_field( $input['stripe-test-public-key'] );
1069
+ $output['stripe-test-secret-key'] = sanitize_text_field( $input['stripe-test-secret-key'] );
1070
+ $output['stripe-live-public-key'] = sanitize_text_field( $input['stripe-live-public-key'] );
1071
+ $output['stripe-live-secret-key'] = sanitize_text_field( $input['stripe-live-secret-key'] );
1072
+
1073
+ $output['stripe-prefill-member-email'] = isset( $input['stripe-prefill-member-email'] ) ? esc_attr( $input['stripe-prefill-member-email'] ) : 0;
1074
+
1075
+ return $output;
1076
+ }
1077
+
1078
  public function sanitize_tab_3( $input ) {
1079
  if ( empty( $this->settings ) ) {
1080
  $this->settings = (array) get_option( 'swpm-settings' );
1081
  }
1082
+ $output = $this->settings;
1083
+ $output['reg-complete-mail-subject'] = sanitize_text_field( $input['reg-complete-mail-subject'] );
1084
+
1085
  $output['reg-complete-mail-body'] = $input['reg-complete-mail-body'];
1086
  $output['reg-complete-mail-subject-admin'] = sanitize_text_field( $input['reg-complete-mail-subject-admin'] );
1087
  $output['reg-complete-mail-body-admin'] = $input['reg-complete-mail-body-admin'];
1099
  $output['email-activation-mail-subject'] = sanitize_text_field( $input['email-activation-mail-subject'] );
1100
  $output['email-activation-mail-body'] = $input['email-activation-mail-body'];
1101
 
1102
+ $output['reg-prompt-complete-mail-subject'] = sanitize_text_field( $input['reg-prompt-complete-mail-subject'] );
1103
+ $output['reg-prompt-complete-mail-body'] = $input['reg-prompt-complete-mail-body'];
1104
+ $output['email-from'] = trim( $input['email-from'] );
1105
+ $output['email-enable-html'] = isset( $input['email-enable-html'] ) ? esc_attr( $input['email-enable-html'] ) : '';
1106
+
1107
  $output['enable-admin-notification-after-reg'] = isset( $input['enable-admin-notification-after-reg'] ) ? esc_attr( $input['enable-admin-notification-after-reg'] ) : '';
1108
  $output['admin-notification-email'] = sanitize_text_field( $input['admin-notification-email'] );
1109
  $output['enable-notification-after-manual-user-add'] = isset( $input['enable-notification-after-manual-user-add'] ) ? esc_attr( $input['enable-notification-after-manual-user-add'] ) : '';
classes/class.swpm-utils-member.php CHANGED
@@ -6,237 +6,250 @@
6
  */
7
  class SwpmMemberUtils {
8
 
9
- public static function create_swpm_member_entry_from_array_data($fields){
10
- global $wpdb;
11
- $res = $wpdb->insert( $wpdb->prefix . "swpm_members_tbl", $fields );
12
-
13
- if ( ! $res ) {
14
- //DB error occurred
15
- $error_msg = 'create_swpm_member_entry_from_array_data() - DB error occurred: ' . json_encode( $wpdb->last_result );
16
- SwpmLog::log_simple_debug( $error_msg, false );
17
- }
18
-
19
- $member_id = $wpdb->insert_id;
20
- SwpmLog::log_simple_debug( 'create_swpm_member_entry_from_array_data() - SWPM member entry created successfully. Member ID: '. $member_id, true );
21
- return $member_id;
22
- }
23
-
24
- public static function is_member_logged_in() {
25
- $auth = SwpmAuth::get_instance();
26
- if ($auth->is_logged_in()) {
27
- return true;
28
- } else {
29
- return false;
30
- }
31
- }
32
-
33
- public static function get_logged_in_members_id() {
34
- $auth = SwpmAuth::get_instance();
35
- if (!$auth->is_logged_in()) {
36
- return SwpmUtils::_("User is not logged in.");
37
- }
38
- return $auth->get('member_id');
39
- }
40
-
41
- public static function get_logged_in_members_username() {
42
- $auth = SwpmAuth::get_instance();
43
- if (!$auth->is_logged_in()) {
44
- return SwpmUtils::_("User is not logged in.");
45
- }
46
- return $auth->get('user_name');
47
- }
48
-
49
- public static function get_logged_in_members_level() {
50
- $auth = SwpmAuth::get_instance();
51
- if (!$auth->is_logged_in()) {
52
- return SwpmUtils::_("User is not logged in.");
53
- }
54
- return $auth->get('membership_level');
55
- }
56
-
57
- public static function get_logged_in_members_level_name() {
58
- $auth = SwpmAuth::get_instance();
59
- if ($auth->is_logged_in()) {
60
- return $auth->get('alias');
61
- }
62
- return SwpmUtils::_("User is not logged in.");
63
- }
64
-
65
- public static function get_member_field_by_id($id, $field, $default = '') {
66
- global $wpdb;
67
- $query = "SELECT * FROM " . $wpdb->prefix . "swpm_members_tbl WHERE member_id = %d";
68
- $userData = $wpdb->get_row($wpdb->prepare($query, $id));
69
- if (isset($userData->$field)) {
70
- return $userData->$field;
71
- }
72
-
73
- return apply_filters('swpm_get_member_field_by_id', $default, $id, $field);
74
- }
75
-
76
- public static function get_formatted_expiry_date_by_user_id($swpm_id){
77
- $expiry_timestamp = SwpmMemberUtils::get_expiry_date_timestamp_by_user_id($swpm_id);
78
- if($expiry_timestamp == PHP_INT_MAX){
79
- //No Expiry Setting
80
- $formatted_expiry_date = SwpmUtils::_("No Expiry");
81
- } else {
82
- $expiry_date = date('Y-m-d', $expiry_timestamp);
83
- $formatted_expiry_date = SwpmUtils::get_formatted_date_according_to_wp_settings($expiry_date);
84
- }
85
- return $formatted_expiry_date;
86
- }
87
-
88
- public static function get_expiry_date_timestamp_by_user_id($swpm_id){
89
- $swpm_user = SwpmMemberUtils::get_user_by_id($swpm_id);
90
- $expiry_timestamp = SwpmUtils::get_expiration_timestamp($swpm_user);
91
- return $expiry_timestamp;
92
- }
93
-
94
- public static function get_user_by_id($swpm_id) {
95
- //Retrieves the SWPM user record for the given member ID
96
- global $wpdb;
97
- $query = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}swpm_members_tbl WHERE member_id = %d", $swpm_id);
98
- $result = $wpdb->get_row($query);
99
- return $result;
100
- }
101
-
102
- public static function get_user_by_user_name($swpm_user_name) {
103
- //Retrieves the SWPM user record for the given member username
104
- global $wpdb;
105
- $query = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}swpm_members_tbl WHERE user_name = %s", $swpm_user_name);
106
- $result = $wpdb->get_row($query);
107
- return $result;
108
- }
109
-
110
- public static function get_user_by_email($swpm_email) {
111
- //Retrieves the SWPM user record for the given member email address
112
- global $wpdb;
113
- $query = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}swpm_members_tbl WHERE email = %s", $swpm_email);
114
- $result = $wpdb->get_row($query);
115
- return $result;
116
- }
117
-
118
- public static function get_wp_user_from_swpm_user_id($swpm_id) {
119
- //Retrieves the WP user record for the given SWPM member ID.
120
- $swpm_user_row = SwpmMemberUtils::get_user_by_id($swpm_id);
121
- $username = $swpm_user_row->user_name;
122
- $wp_user = get_user_by('login', $username);
123
- return $wp_user;
124
- }
125
-
126
- public static function get_all_members_of_a_level($level_id) {
127
- //Retrieves all the SWPM user records for the given membership level
128
- global $wpdb;
129
- $query = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}swpm_members_tbl WHERE membership_level = %s", $level_id);
130
- $result = $wpdb->get_results($query);
131
- return $result;
132
- }
133
-
134
- /*
135
- * Use this function to update or set membership level of a member easily.
136
- */
137
- public static function update_membership_level($member_id, $target_membership_level) {
138
- global $wpdb;
139
- $members_table_name = $wpdb->prefix . "swpm_members_tbl";
140
- $query = $wpdb->prepare("UPDATE $members_table_name SET membership_level=%s WHERE member_id=%s", $target_membership_level, $member_id);
141
- $resultset = $wpdb->query($query);
142
- }
143
-
144
- /*
145
- * Use this function to update or set account status of a member easily.
146
- */
147
- public static function update_account_state($member_id, $new_status = 'active') {
148
- global $wpdb;
149
- $members_table_name = $wpdb->prefix . "swpm_members_tbl";
150
-
151
- SwpmLog::log_simple_debug("Updating the account status value of member (" . $member_id . ") to: " . $new_status, true);
152
- $query = $wpdb->prepare("UPDATE $members_table_name SET account_state=%s WHERE member_id=%s", $new_status, $member_id);
153
- $resultset = $wpdb->query($query);
154
- }
155
-
156
- /*
157
- * Use this function to update or set access starts date of a member easily.
158
- */
159
- public static function update_access_starts_date($member_id, $new_date) {
160
- global $wpdb;
161
- $members_table_name = $wpdb->prefix . "swpm_members_tbl";
162
- $query = $wpdb->prepare("UPDATE $members_table_name SET subscription_starts=%s WHERE member_id=%s", $new_date, $member_id);
163
- $resultset = $wpdb->query($query);
164
- }
165
-
166
- /*
167
- * Calculates the Access Starts date value considering the level and current expiry. Useful for after payment member profile update.
168
- */
169
- public static function calculate_access_start_date_for_account_update($args){
170
- $swpm_id = $args['swpm_id'];
171
- $membership_level = $args['membership_level'];
172
- $old_membership_level = $args['old_membership_level'];
173
-
174
- $subscription_starts = (date("Y-m-d"));
175
- if($membership_level == $old_membership_level){
176
- //Payment for the same membership level (renewal).
177
-
178
- //Algorithm - ONLY set the $subscription_starts date to current expiry date if the current expiry date is in the future.
179
- //Otherwise set $subscription_starts to TODAY.
180
- $expiry_timestamp = SwpmMemberUtils::get_expiry_date_timestamp_by_user_id($swpm_id);
181
- if($expiry_timestamp > time()){
182
- //Account is not expired. Expiry date is in the future.
183
- $level_row = SwpmUtils::get_membership_level_row_by_id($membership_level);
184
- $subs_duration_type = $level_row->subscription_duration_type;
185
- if($subs_duration_type == SwpmMembershipLevel::NO_EXPIRY){
186
- //No expiry type level.
187
- //Use todays date for $subscription_starts date parameter.
188
- } else if ($subs_duration_type == SwpmMembershipLevel::FIXED_DATE){
189
- //Fixed date expiry level.
190
- //Use todays date for $subscription_starts date parameter.
191
- } else {
192
- //Duration expiry level.
193
- //Set the $subscription_starts date to the current expiry date so the renewal time starts from then.
194
- $subscription_starts = date('Y-m-d', $expiry_timestamp);
195
- }
196
- } else {
197
- //Account is already expired.
198
- //Use todays date for $subscription_starts date parameter.
199
- }
200
- } else {
201
- //Payment for a NEW membership level (upgrade).
202
- //Use todays date for $subscription_starts date parameter.
203
- }
204
-
205
- return $subscription_starts;
206
- }
207
-
208
- public static function is_valid_user_name($user_name){
209
- return preg_match("/^[a-zA-Z0-9.\-_*@]+$/", $user_name)== 1;
210
- }
211
-
212
- public static function wp_user_has_admin_role($wp_user_id){
213
- $caps = get_user_meta($wp_user_id, 'wp_capabilities', true);
214
- if (is_array($caps) && in_array('administrator', array_keys((array) $caps))){
215
- //This wp user has "administrator" role.
216
- return true;
217
- }
218
- return false;
219
- }
220
-
221
- public static function update_wp_user_role_with_level_id($wp_user_id, $level_id){
222
- $level_row = SwpmUtils::get_membership_level_row_by_id($level_id);
223
- $user_role = $level_row->role;
224
- SwpmMemberUtils::update_wp_user_role($wp_user_id, $user_role);
225
- }
226
-
227
- public static function update_wp_user_role($wp_user_id, $role){
228
- if (SwpmUtils::is_multisite_install()) {//MS install
229
- return; //TODO - don't do this for MS install
230
- }
231
-
232
- $admin_user = SwpmMemberUtils::wp_user_has_admin_role($wp_user_id);
233
- if ($admin_user) {
234
- SwpmLog::log_simple_debug('This user has admin role. No role modification will be done.', true);
235
- return;
236
- }
237
-
238
- //wp_update_user() function will trigger the 'set_user_role' hook.
239
- wp_update_user(array('ID' => $wp_user_id, 'role' => $role));
240
- SwpmLog::log_simple_debug('User role updated.', true);
241
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
242
  }
6
  */
7
  class SwpmMemberUtils {
8
 
9
+ public static function create_swpm_member_entry_from_array_data( $fields ) {
10
+ global $wpdb;
11
+ $res = $wpdb->insert( $wpdb->prefix . 'swpm_members_tbl', $fields );
12
+
13
+ if ( ! $res ) {
14
+ //DB error occurred
15
+ $error_msg = 'create_swpm_member_entry_from_array_data() - DB error occurred: ' . json_encode( $wpdb->last_result );
16
+ SwpmLog::log_simple_debug( $error_msg, false );
17
+ }
18
+
19
+ $member_id = $wpdb->insert_id;
20
+ SwpmLog::log_simple_debug( 'create_swpm_member_entry_from_array_data() - SWPM member entry created successfully. Member ID: ' . $member_id, true );
21
+ return $member_id;
22
+ }
23
+
24
+ public static function is_member_logged_in() {
25
+ $auth = SwpmAuth::get_instance();
26
+ if ( $auth->is_logged_in() ) {
27
+ return true;
28
+ } else {
29
+ return false;
30
+ }
31
+ }
32
+
33
+ public static function get_logged_in_members_id() {
34
+ $auth = SwpmAuth::get_instance();
35
+ if ( ! $auth->is_logged_in() ) {
36
+ return SwpmUtils::_( 'User is not logged in.' );
37
+ }
38
+ return $auth->get( 'member_id' );
39
+ }
40
+
41
+ public static function get_logged_in_members_username() {
42
+ $auth = SwpmAuth::get_instance();
43
+ if ( ! $auth->is_logged_in() ) {
44
+ return SwpmUtils::_( 'User is not logged in.' );
45
+ }
46
+ return $auth->get( 'user_name' );
47
+ }
48
+
49
+ public static function get_logged_in_members_level() {
50
+ $auth = SwpmAuth::get_instance();
51
+ if ( ! $auth->is_logged_in() ) {
52
+ return SwpmUtils::_( 'User is not logged in.' );
53
+ }
54
+ return $auth->get( 'membership_level' );
55
+ }
56
+
57
+ public static function get_logged_in_members_level_name() {
58
+ $auth = SwpmAuth::get_instance();
59
+ if ( $auth->is_logged_in() ) {
60
+ return $auth->get( 'alias' );
61
+ }
62
+ return SwpmUtils::_( 'User is not logged in.' );
63
+ }
64
+
65
+ public static function get_member_field_by_id( $id, $field, $default = '' ) {
66
+ global $wpdb;
67
+ $query = 'SELECT * FROM ' . $wpdb->prefix . 'swpm_members_tbl WHERE member_id = %d';
68
+ $userData = $wpdb->get_row( $wpdb->prepare( $query, $id ) );
69
+ if ( isset( $userData->$field ) ) {
70
+ return $userData->$field;
71
+ }
72
+
73
+ return apply_filters( 'swpm_get_member_field_by_id', $default, $id, $field );
74
+ }
75
+
76
+ public static function get_formatted_expiry_date_by_user_id( $swpm_id ) {
77
+ $expiry_timestamp = self::get_expiry_date_timestamp_by_user_id( $swpm_id );
78
+ if ( $expiry_timestamp == PHP_INT_MAX ) {
79
+ //No Expiry Setting
80
+ $formatted_expiry_date = SwpmUtils::_( 'No Expiry' );
81
+ } else {
82
+ $expiry_date = date( 'Y-m-d', $expiry_timestamp );
83
+ $formatted_expiry_date = SwpmUtils::get_formatted_date_according_to_wp_settings( $expiry_date );
84
+ }
85
+ return $formatted_expiry_date;
86
+ }
87
+
88
+ public static function get_expiry_date_timestamp_by_user_id( $swpm_id ) {
89
+ $swpm_user = self::get_user_by_id( $swpm_id );
90
+ $expiry_timestamp = SwpmUtils::get_expiration_timestamp( $swpm_user );
91
+ return $expiry_timestamp;
92
+ }
93
+
94
+ public static function get_user_by_id( $swpm_id ) {
95
+ //Retrieves the SWPM user record for the given member ID
96
+ global $wpdb;
97
+ $query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}swpm_members_tbl WHERE member_id = %d", $swpm_id );
98
+ $result = $wpdb->get_row( $query );
99
+ return $result;
100
+ }
101
+
102
+ public static function get_user_by_user_name( $swpm_user_name ) {
103
+ //Retrieves the SWPM user record for the given member username
104
+ global $wpdb;
105
+ $query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}swpm_members_tbl WHERE user_name = %s", $swpm_user_name );
106
+ $result = $wpdb->get_row( $query );
107
+ return $result;
108
+ }
109
+
110
+ public static function get_user_by_email( $swpm_email ) {
111
+ //Retrieves the SWPM user record for the given member email address
112
+ global $wpdb;
113
+ $query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}swpm_members_tbl WHERE email = %s", $swpm_email );
114
+ $result = $wpdb->get_row( $query );
115
+ return $result;
116
+ }
117
+
118
+ public static function get_user_by_subsriber_id( $subsc_id ) {
119
+ //Retrieves the SWPM user record for the given member ID
120
+ global $wpdb;
121
+ $query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}swpm_members_tbl WHERE subscr_id = %s", $subsc_id );
122
+ $result = $wpdb->get_row( $query );
123
+ return $result;
124
+ }
125
+
126
+ public static function get_wp_user_from_swpm_user_id( $swpm_id ) {
127
+ //Retrieves the WP user record for the given SWPM member ID.
128
+ $swpm_user_row = self::get_user_by_id( $swpm_id );
129
+ $username = $swpm_user_row->user_name;
130
+ $wp_user = get_user_by( 'login', $username );
131
+ return $wp_user;
132
+ }
133
+
134
+ public static function get_all_members_of_a_level( $level_id ) {
135
+ //Retrieves all the SWPM user records for the given membership level
136
+ global $wpdb;
137
+ $query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}swpm_members_tbl WHERE membership_level = %s", $level_id );
138
+ $result = $wpdb->get_results( $query );
139
+ return $result;
140
+ }
141
+
142
+ /*
143
+ * Use this function to update or set membership level of a member easily.
144
+ */
145
+ public static function update_membership_level( $member_id, $target_membership_level ) {
146
+ global $wpdb;
147
+ $members_table_name = $wpdb->prefix . 'swpm_members_tbl';
148
+ $query = $wpdb->prepare( "UPDATE $members_table_name SET membership_level=%s WHERE member_id=%s", $target_membership_level, $member_id );
149
+ $resultset = $wpdb->query( $query );
150
+ }
151
+
152
+ /*
153
+ * Use this function to update or set account status of a member easily.
154
+ */
155
+ public static function update_account_state( $member_id, $new_status = 'active' ) {
156
+ global $wpdb;
157
+ $members_table_name = $wpdb->prefix . 'swpm_members_tbl';
158
+
159
+ SwpmLog::log_simple_debug( 'Updating the account status value of member (' . $member_id . ') to: ' . $new_status, true );
160
+ $query = $wpdb->prepare( "UPDATE $members_table_name SET account_state=%s WHERE member_id=%s", $new_status, $member_id );
161
+ $resultset = $wpdb->query( $query );
162
+ }
163
+
164
+ /*
165
+ * Use this function to update or set access starts date of a member easily.
166
+ */
167
+ public static function update_access_starts_date( $member_id, $new_date ) {
168
+ global $wpdb;
169
+ $members_table_name = $wpdb->prefix . 'swpm_members_tbl';
170
+ $query = $wpdb->prepare( "UPDATE $members_table_name SET subscription_starts=%s WHERE member_id=%s", $new_date, $member_id );
171
+ $resultset = $wpdb->query( $query );
172
+ }
173
+
174
+ /*
175
+ * Calculates the Access Starts date value considering the level and current expiry. Useful for after payment member profile update.
176
+ */
177
+ public static function calculate_access_start_date_for_account_update( $args ) {
178
+ $swpm_id = $args['swpm_id'];
179
+ $membership_level = $args['membership_level'];
180
+ $old_membership_level = $args['old_membership_level'];
181
+
182
+ $subscription_starts = ( date( 'Y-m-d' ) );
183
+ if ( $membership_level == $old_membership_level ) {
184
+ //Payment for the same membership level (renewal).
185
+
186
+ //Algorithm - ONLY set the $subscription_starts date to current expiry date if the current expiry date is in the future.
187
+ //Otherwise set $subscription_starts to TODAY.
188
+ $expiry_timestamp = self::get_expiry_date_timestamp_by_user_id( $swpm_id );
189
+ if ( $expiry_timestamp > time() ) {
190
+ //Account is not expired. Expiry date is in the future.
191
+ $level_row = SwpmUtils::get_membership_level_row_by_id( $membership_level );
192
+ $subs_duration_type = $level_row->subscription_duration_type;
193
+ if ( $subs_duration_type == SwpmMembershipLevel::NO_EXPIRY ) {
194
+ //No expiry type level.
195
+ //Use todays date for $subscription_starts date parameter.
196
+ } elseif ( $subs_duration_type == SwpmMembershipLevel::FIXED_DATE ) {
197
+ //Fixed date expiry level.
198
+ //Use todays date for $subscription_starts date parameter.
199
+ } else {
200
+ //Duration expiry level.
201
+ //Set the $subscription_starts date to the current expiry date so the renewal time starts from then.
202
+ $subscription_starts = date( 'Y-m-d', $expiry_timestamp );
203
+ }
204
+ } else {
205
+ //Account is already expired.
206
+ //Use todays date for $subscription_starts date parameter.
207
+ }
208
+ } else {
209
+ //Payment for a NEW membership level (upgrade).
210
+ //Use todays date for $subscription_starts date parameter.
211
+ }
212
+
213
+ return $subscription_starts;
214
+ }
215
+
216
+ public static function is_valid_user_name( $user_name ) {
217
+ return preg_match( '/^[a-zA-Z0-9.\-_*@]+$/', $user_name ) == 1;
218
+ }
219
+
220
+ public static function wp_user_has_admin_role( $wp_user_id ) {
221
+ $caps = get_user_meta( $wp_user_id, 'wp_capabilities', true );
222
+ if ( is_array( $caps ) && in_array( 'administrator', array_keys( (array) $caps ) ) ) {
223
+ //This wp user has "administrator" role.
224
+ return true;
225
+ }
226
+ return false;
227
+ }
228
+
229
+ public static function update_wp_user_role_with_level_id( $wp_user_id, $level_id ) {
230
+ $level_row = SwpmUtils::get_membership_level_row_by_id( $level_id );
231
+ $user_role = $level_row->role;
232
+ self::update_wp_user_role( $wp_user_id, $user_role );
233
+ }
234
+
235
+ public static function update_wp_user_role( $wp_user_id, $role ) {
236
+ if ( SwpmUtils::is_multisite_install() ) {//MS install
237
+ return; //TODO - don't do this for MS install
238
+ }
239
+
240
+ $admin_user = self::wp_user_has_admin_role( $wp_user_id );
241
+ if ( $admin_user ) {
242
+ SwpmLog::log_simple_debug( 'This user has admin role. No role modification will be done.', true );
243
+ return;
244
+ }
245
+
246
+ //wp_update_user() function will trigger the 'set_user_role' hook.
247
+ wp_update_user(
248
+ array(
249
+ 'ID' => $wp_user_id,
250
+ 'role' => $role,
251
+ )
252
+ );
253
+ SwpmLog::log_simple_debug( 'User role updated.', true );
254
+ }
255
  }
classes/class.swpm-utils-misc.php CHANGED
@@ -203,8 +203,9 @@ class SwpmMiscUtils {
203
  public static function get_current_page_url() {
204
  $pageURL = 'http';
205
 
206
- if ( isset( $_SERVER['SCRIPT_URI'] ) && ! empty( $_SERVER['SCRIPT_URI'] ) ) {
207
  $pageURL = $_SERVER['SCRIPT_URI'];
 
208
  $pageURL = apply_filters( 'swpm_get_current_page_url_filter', $pageURL );
209
  return $pageURL;
210
  }
@@ -721,7 +722,45 @@ class SwpmMiscUtils {
721
  //this function loads Stripe PHP SDK and ensures only once instance is loaded
722
  if ( ! class_exists( '\Stripe\Stripe' ) ) {
723
  require_once SIMPLE_WP_MEMBERSHIP_PATH . 'lib/stripe-gateway/init.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
724
  }
 
725
  }
726
 
727
  public static function mail( $email, $subject, $email_body, $headers ) {
@@ -740,8 +779,8 @@ class SwpmMiscUtils {
740
  public static function output_stripe_sca_frontend_scripts_once() {
741
  $out = '';
742
  if ( ! self::$stripe_sca_frontend_scripts_printed ) {
743
- $out .= '<script src="https://js.stripe.com/v3/"></script>';
744
- $out .= "<link rel='stylesheet' href='https://checkout.stripe.com/v3/checkout/button.css' type='text/css' media='all' />";
745
  self::$stripe_sca_frontend_scripts_printed = true;
746
  }
747
  return $out;
203
  public static function get_current_page_url() {
204
  $pageURL = 'http';
205
 
206
+ if ( isset( $_SERVER['SCRIPT_URI'] ) && ! empty( $_SERVER['SCRIPT_URI'] ) ) {
207
  $pageURL = $_SERVER['SCRIPT_URI'];
208
+ $pageURL = str_replace(':443', '', $pageURL);//remove any port number from the URL value (some hosts include the port number with this).
209
  $pageURL = apply_filters( 'swpm_get_current_page_url_filter', $pageURL );
210
  return $pageURL;
211
  }
722
  //this function loads Stripe PHP SDK and ensures only once instance is loaded
723
  if ( ! class_exists( '\Stripe\Stripe' ) ) {
724
  require_once SIMPLE_WP_MEMBERSHIP_PATH . 'lib/stripe-gateway/init.php';
725
+ \Stripe\Stripe::setAppInfo( 'Simple Membership', SIMPLE_WP_MEMBERSHIP_VER, 'https://simple-membership-plugin.com/', 'pp_partner_Fvas9OJ0jQ2oNQ' );
726
+ }
727
+ }
728
+
729
+ public static function get_stripe_api_keys_from_payment_button( $button_id, $live = false ) {
730
+ $keys = array(
731
+ 'public' => '',
732
+ 'secret' => '',
733
+ );
734
+ $button = get_post( $button_id );
735
+ if ( $button ) {
736
+ $opts = get_option( 'swpm-settings' );
737
+ $use_global_keys = get_post_meta( $button_id, 'stripe_use_global_keys', true );
738
+
739
+ if ( $use_global_keys ) {
740
+ if ( $live ) {
741
+ $keys['public'] = isset( $opts['stripe-live-public-key'] ) ? $opts['stripe-live-public-key'] : '';
742
+ $keys['secret'] = isset( $opts['stripe-live-secret-key'] ) ? $opts['stripe-live-secret-key'] : '';
743
+ } else {
744
+ $keys['public'] = isset( $opts['stripe-test-public-key'] ) ? $opts['stripe-test-public-key'] : '';
745
+ $keys['secret'] = isset( $opts['stripe-test-secret-key'] ) ? $opts['stripe-test-secret-key'] : '';
746
+ }
747
+ } else {
748
+ if ( $live ) {
749
+ $stripe_live_secret_key = get_post_meta( $button_id, 'stripe_live_secret_key', true );
750
+ $stripe_live_publishable_key = get_post_meta( $button_id, 'stripe_live_publishable_key', true );
751
+
752
+ $keys['public'] = $stripe_live_publishable_key;
753
+ $keys['secret'] = $stripe_live_secret_key;
754
+ } else {
755
+ $stripe_test_secret_key = get_post_meta( $button_id, 'stripe_test_secret_key', true );
756
+ $stripe_test_publishable_key = get_post_meta( $button_id, 'stripe_test_publishable_key', true );
757
+
758
+ $keys['public'] = $stripe_test_publishable_key;
759
+ $keys['secret'] = $stripe_test_secret_key;
760
+ }
761
+ }
762
  }
763
+ return $keys;
764
  }
765
 
766
  public static function mail( $email, $subject, $email_body, $headers ) {
779
  public static function output_stripe_sca_frontend_scripts_once() {
780
  $out = '';
781
  if ( ! self::$stripe_sca_frontend_scripts_printed ) {
782
+ $out .= '<script src="https://js.stripe.com/v3/"></script>';
783
+ $out .= "<link rel='stylesheet' href='https://checkout.stripe.com/v3/checkout/button.css' type='text/css' media='all' />";
784
  self::$stripe_sca_frontend_scripts_printed = true;
785
  }
786
  return $out;
classes/shortcode-related/class.swpm-shortcodes-handler.php CHANGED
@@ -107,6 +107,8 @@ class SwpmShortcodesHandler {
107
  $join_page_url = SwpmSettings::get_instance()->get_value('join-us-page-url');
108
  $profile_page_url = SwpmSettings::get_instance()->get_value('profile-page-url');
109
  $logout_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '?swpm-logout=true';
 
 
110
 
111
  $output = '<div class="swpm_mini_login_wrapper">';
112
 
@@ -121,7 +123,7 @@ class SwpmShortcodesHandler {
121
  $output .= '<span class="swpm_mini_login_logout"> | <a href="'.$logout_url.'">'.SwpmUtils::_('Logout').'</a></span>';
122
  } else {
123
  //User not logged in.
124
- $output .= '<span class="swpm_mini_login_login_here"><a href="'.$login_page_url.'">'.SwpmUtils::_('Login Here').'</a></span>';
125
  $output .= '<span class="swpm_mini_login_no_membership"> | '.SwpmUtils::_('Not a member? ').'</span>';
126
  $output .= '<span class="swpm_mini_login_join_now"><a href="'.$join_page_url.'">'.SwpmUtils::_('Join Now').'</a></span>';
127
  }
107
  $join_page_url = SwpmSettings::get_instance()->get_value('join-us-page-url');
108
  $profile_page_url = SwpmSettings::get_instance()->get_value('profile-page-url');
109
  $logout_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '?swpm-logout=true';
110
+
111
+ $filtered_login_url = apply_filters( 'swpm_get_login_link_url', $login_page_url ); //Addons can override the login URL value using this filter.
112
 
113
  $output = '<div class="swpm_mini_login_wrapper">';
114
 
123
  $output .= '<span class="swpm_mini_login_logout"> | <a href="'.$logout_url.'">'.SwpmUtils::_('Logout').'</a></span>';
124
  } else {
125
  //User not logged in.
126
+ $output .= '<span class="swpm_mini_login_login_here"><a href="'.$filtered_login_url.'">'.SwpmUtils::_('Login Here').'</a></span>';
127
  $output .= '<span class="swpm_mini_login_no_membership"> | '.SwpmUtils::_('Not a member? ').'</span>';
128
  $output .= '<span class="swpm_mini_login_join_now"><a href="'.$join_page_url.'">'.SwpmUtils::_('Join Now').'</a></span>';
129
  }
ipn/swpm-stripe-buy-now-ipn.php CHANGED
@@ -15,7 +15,7 @@ class SwpmStripeBuyNowIpnHandler {
15
 
16
  // Include the Stripe library.
17
  SwpmMiscUtils::load_stripe_lib();
18
-
19
  // Read and sanitize the request parameters.
20
  $button_id = sanitize_text_field( $_REQUEST['item_number'] );
21
  $button_id = absint( $button_id );
@@ -65,17 +65,12 @@ class SwpmStripeBuyNowIpnHandler {
65
  // Sandbox and other settings
66
  $settings = SwpmSettings::get_instance();
67
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
68
- if ( $sandbox_enabled ) {
69
- SwpmLog::log_simple_debug( 'Sandbox payment mode is enabled. Using test API key details.', true );
70
- $secret_key = get_post_meta( $button_id, 'stripe_test_secret_key', true );
71
- // Use sandbox API key
72
- } else {
73
- $secret_key = get_post_meta( $button_id, 'stripe_live_secret_key', true );
74
- // Use live API key
75
- }
76
 
77
  // Set secret API key in the Stripe library
78
- \Stripe\Stripe::setApiKey( $secret_key );
79
 
80
  // Get the credit card details submitted by the form
81
  $token = $stripe_token;
@@ -120,7 +115,7 @@ class SwpmStripeBuyNowIpnHandler {
120
  $ipn_data['payer_email'] = $stripe_email;
121
  $ipn_data['membership_level'] = $membership_level_id;
122
  $ipn_data['txn_id'] = $txn_id;
123
- $ipn_data['subscr_id'] = '';
124
  $ipn_data['swpm_id'] = $swpm_id;
125
  $ipn_data['ip'] = $custom_var['user_ip'];
126
  $ipn_data['custom'] = $custom;
15
 
16
  // Include the Stripe library.
17
  SwpmMiscUtils::load_stripe_lib();
18
+
19
  // Read and sanitize the request parameters.
20
  $button_id = sanitize_text_field( $_REQUEST['item_number'] );
21
  $button_id = absint( $button_id );
65
  // Sandbox and other settings
66
  $settings = SwpmSettings::get_instance();
67
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
68
+
69
+ //API keys
70
+ $api_keys = SwpmMiscUtils::get_stripe_api_keys_from_payment_button( $button_id, ! $sandbox_enabled );
 
 
 
 
 
71
 
72
  // Set secret API key in the Stripe library
73
+ \Stripe\Stripe::setApiKey( $api_keys['secret'] );
74
 
75
  // Get the credit card details submitted by the form
76
  $token = $stripe_token;
115
  $ipn_data['payer_email'] = $stripe_email;
116
  $ipn_data['membership_level'] = $membership_level_id;
117
  $ipn_data['txn_id'] = $txn_id;
118
+ $ipn_data['subscr_id'] = $txn_id;/* Set the txn_id as subscriber_id so it is similar to PayPal buy now. Also, it can connect to the profile in the "payments" menu. */
119
  $ipn_data['swpm_id'] = $swpm_id;
120
  $ipn_data['ip'] = $custom_var['user_ip'];
121
  $ipn_data['custom'] = $custom;
ipn/swpm-stripe-sca-buy-now-ipn.php CHANGED
@@ -46,20 +46,14 @@ class SwpmStripeSCABuyNowIpnHandler {
46
  $settings = SwpmSettings::get_instance();
47
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
48
 
49
- if ( $sandbox_enabled ) {
50
- SwpmLog::log_simple_debug( 'Sandbox payment mode is enabled. Using test API key details.', true );
51
- $secret_key = get_post_meta( $button_id, 'stripe_test_secret_key', true );
52
- // Use sandbox API key
53
- } else {
54
- $secret_key = get_post_meta( $button_id, 'stripe_live_secret_key', true );
55
- // Use live API key
56
- }
57
 
58
  // Include the Stripe library.
59
  SwpmMiscUtils::load_stripe_lib();
60
 
61
  try {
62
- \Stripe\Stripe::setApiKey( $secret_key );
63
 
64
  $events = \Stripe\Event::all(
65
  array(
@@ -91,7 +85,7 @@ class SwpmStripeSCABuyNowIpnHandler {
91
 
92
  $pi = \Stripe\PaymentIntent::retrieve( $pi_id );
93
  } catch ( Exception $e ) {
94
- $err = 'Error occurred: ' . $e->getMessage();
95
  SwpmLog::log_simple_debug( $error_msg, false );
96
  wp_die( esc_html( $error_msg ) );
97
  }
@@ -191,7 +185,7 @@ class SwpmStripeSCABuyNowIpnHandler {
191
  $ipn_data['payer_email'] = $stripe_email;
192
  $ipn_data['membership_level'] = $membership_level_id;
193
  $ipn_data['txn_id'] = $txn_id;
194
- $ipn_data['subscr_id'] = '';
195
  $ipn_data['swpm_id'] = $swpm_id;
196
  $ipn_data['ip'] = $custom_var['user_ip'];
197
  $ipn_data['custom'] = $custom;
@@ -235,6 +229,9 @@ class SwpmStripeSCABuyNowIpnHandler {
235
  wp_send_json( array( 'error' => 'No button ID provided' ) );
236
  }
237
 
 
 
 
238
  $settings = SwpmSettings::get_instance();
239
  $button_cpt = get_post( $button_id ); //Retrieve the CPT for this button
240
  $item_name = htmlspecialchars( $button_cpt->post_title );
@@ -250,7 +247,10 @@ class SwpmStripeSCABuyNowIpnHandler {
250
 
251
  $payment_currency = get_post_meta( $button_id, 'payment_currency', true );
252
  $payment_amount = round( $payment_amount, 2 ); //round the amount to 2 decimal place.
253
- $zero_cents = unserialize( SIMPLE_WP_MEMBERSHIP_STRIPE_ZERO_CENTS );
 
 
 
254
  if ( in_array( $payment_currency, $zero_cents ) ) {
255
  //this is zero-cents currency, amount shouldn't be multiplied by 100
256
  $price_in_cents = $payment_amount;
@@ -277,17 +277,7 @@ class SwpmStripeSCABuyNowIpnHandler {
277
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
278
 
279
  //API keys
280
- $stripe_test_secret_key = get_post_meta( $button_id, 'stripe_test_secret_key', true );
281
- $stripe_test_publishable_key = get_post_meta( $button_id, 'stripe_test_publishable_key', true );
282
- $stripe_live_secret_key = get_post_meta( $button_id, 'stripe_live_secret_key', true );
283
- $stripe_live_publishable_key = get_post_meta( $button_id, 'stripe_live_publishable_key', true );
284
- if ( $sandbox_enabled ) {
285
- $publishable_key = $stripe_test_publishable_key; //Use sandbox API key
286
- $secret_key = $stripe_test_secret_key;
287
- } else {
288
- $publishable_key = $stripe_live_publishable_key; //Use live API key
289
- $secret_key = $stripe_live_secret_key;
290
- }
291
 
292
  //Billing address
293
  $billing_address = isset( $args['billing_address'] ) ? '1' : '';
@@ -314,10 +304,18 @@ class SwpmStripeSCABuyNowIpnHandler {
314
 
315
  $current_url = ! empty( $current_url_posted ) ? $current_url_posted : SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL;
316
 
 
 
 
 
 
 
 
 
317
  SwpmMiscUtils::load_stripe_lib();
318
 
319
  try {
320
- \Stripe\Stripe::setApiKey( $secret_key );
321
 
322
  if ( empty( $plan_id ) ) {
323
  //this is one-off payment
@@ -361,6 +359,12 @@ class SwpmStripeSCABuyNowIpnHandler {
361
  $opts['line_items'][0]['images'] = array( $item_logo );
362
  }
363
 
 
 
 
 
 
 
364
  $session = \Stripe\Checkout\Session::create( $opts );
365
  } catch ( Exception $e ) {
366
  $err = $e->getMessage();
46
  $settings = SwpmSettings::get_instance();
47
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
48
 
49
+ //API keys
50
+ $api_keys = SwpmMiscUtils::get_stripe_api_keys_from_payment_button( $button_id, ! $sandbox_enabled );
 
 
 
 
 
 
51
 
52
  // Include the Stripe library.
53
  SwpmMiscUtils::load_stripe_lib();
54
 
55
  try {
56
+ \Stripe\Stripe::setApiKey( $api_keys['secret'] );
57
 
58
  $events = \Stripe\Event::all(
59
  array(
85
 
86
  $pi = \Stripe\PaymentIntent::retrieve( $pi_id );
87
  } catch ( Exception $e ) {
88
+ $error_msg = 'Error occurred: ' . $e->getMessage();
89
  SwpmLog::log_simple_debug( $error_msg, false );
90
  wp_die( esc_html( $error_msg ) );
91
  }
185
  $ipn_data['payer_email'] = $stripe_email;
186
  $ipn_data['membership_level'] = $membership_level_id;
187
  $ipn_data['txn_id'] = $txn_id;
188
+ $ipn_data['subscr_id'] = $txn_id;/* Set the txn_id as subscriber_id so it is similar to PayPal buy now. Also, it can connect to the profile in the "payments" menu. */
189
  $ipn_data['swpm_id'] = $swpm_id;
190
  $ipn_data['ip'] = $custom_var['user_ip'];
191
  $ipn_data['custom'] = $custom;
229
  wp_send_json( array( 'error' => 'No button ID provided' ) );
230
  }
231
 
232
+ $uniqid = filter_input( INPUT_POST, 'swpm_uniqid', FILTER_SANITIZE_STRING );
233
+ $uniqid = ! empty( $uniqid ) ? $uniqid : '';
234
+
235
  $settings = SwpmSettings::get_instance();
236
  $button_cpt = get_post( $button_id ); //Retrieve the CPT for this button
237
  $item_name = htmlspecialchars( $button_cpt->post_title );
247
 
248
  $payment_currency = get_post_meta( $button_id, 'payment_currency', true );
249
  $payment_amount = round( $payment_amount, 2 ); //round the amount to 2 decimal place.
250
+
251
+ $payment_amount = apply_filters( 'swpm_payment_amount_filter', $payment_amount, $button_id );
252
+
253
+ $zero_cents = unserialize( SIMPLE_WP_MEMBERSHIP_STRIPE_ZERO_CENTS );
254
  if ( in_array( $payment_currency, $zero_cents ) ) {
255
  //this is zero-cents currency, amount shouldn't be multiplied by 100
256
  $price_in_cents = $payment_amount;
277
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
278
 
279
  //API keys
280
+ $api_keys = SwpmMiscUtils::get_stripe_api_keys_from_payment_button( $button_id, ! $sandbox_enabled );
 
 
 
 
 
 
 
 
 
 
281
 
282
  //Billing address
283
  $billing_address = isset( $args['billing_address'] ) ? '1' : '';
304
 
305
  $current_url = ! empty( $current_url_posted ) ? $current_url_posted : SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL;
306
 
307
+ //prefill member email
308
+ $prefill_member_email = $settings->get_value( 'stripe-prefill-member-email' );
309
+
310
+ if ( $prefill_member_email ) {
311
+ $auth = SwpmAuth::get_instance();
312
+ $member_email = $auth->get( 'email' );
313
+ }
314
+
315
  SwpmMiscUtils::load_stripe_lib();
316
 
317
  try {
318
+ \Stripe\Stripe::setApiKey( $api_keys['secret'] );
319
 
320
  if ( empty( $plan_id ) ) {
321
  //this is one-off payment
359
  $opts['line_items'][0]['images'] = array( $item_logo );
360
  }
361
 
362
+ if ( ! empty( $member_email ) ) {
363
+ $opts['customer_email'] = $member_email;
364
+ }
365
+
366
+ $opts = apply_filters( 'swpm_stripe_sca_session_opts', $opts, $button_id );
367
+
368
  $session = \Stripe\Checkout\Session::create( $opts );
369
  } catch ( Exception $e ) {
370
  $err = $e->getMessage();
ipn/swpm-stripe-sca-subscription-ipn.php CHANGED
@@ -10,9 +10,9 @@ class SwpmStripeSCASubscriptionIpnHandler {
10
  }
11
 
12
  public function handle_stripe_ipn() {
13
- //This will get executed only for direct post (not webhooks). So it is executed at the time of payment in the browser (via HTTP POST). When the "hook" query arg is not set.
14
- //The webhooks are handled by the "swpm-stripe-subscription-ipn.php" script.
15
-
16
  SwpmLog::log_simple_debug( 'Stripe SCA Subscription IPN (HTTP POST) received. Processing request...', true );
17
  // SwpmLog::log_simple_debug(print_r($_REQUEST, true), true);//Useful for debugging purpose
18
 
@@ -41,20 +41,14 @@ class SwpmStripeSCASubscriptionIpnHandler {
41
  $settings = SwpmSettings::get_instance();
42
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
43
 
44
- if ( $sandbox_enabled ) {
45
- SwpmLog::log_simple_debug( 'Sandbox payment mode is enabled. Using test API key details.', true );
46
- $secret_key = get_post_meta( $button_id, 'stripe_test_secret_key', true );
47
- // Use sandbox API key
48
- } else {
49
- $secret_key = get_post_meta( $button_id, 'stripe_live_secret_key', true );
50
- // Use live API key
51
- }
52
 
53
  // Include the Stripe library.
54
  SwpmMiscUtils::load_stripe_lib();
55
 
56
  try {
57
- \Stripe\Stripe::setApiKey( $secret_key );
58
 
59
  $events = \Stripe\Event::all(
60
  array(
@@ -132,6 +126,8 @@ class SwpmStripeSCASubscriptionIpnHandler {
132
 
133
  $payment_amount = floatval( $payment_amount );
134
 
 
 
135
  $membership_level_id = get_post_meta( $button_id, 'membership_level_id', true );
136
 
137
  // Everything went ahead smoothly with the charge.
10
  }
11
 
12
  public function handle_stripe_ipn() {
13
+ //This will get executed only for direct post (not webhooks). So it is executed at the time of payment in the browser (via HTTP POST). When the "hook" query arg is not set.
14
+ //The webhooks are handled by the "swpm-stripe-subscription-ipn.php" script.
15
+
16
  SwpmLog::log_simple_debug( 'Stripe SCA Subscription IPN (HTTP POST) received. Processing request...', true );
17
  // SwpmLog::log_simple_debug(print_r($_REQUEST, true), true);//Useful for debugging purpose
18
 
41
  $settings = SwpmSettings::get_instance();
42
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
43
 
44
+ //API keys
45
+ $api_keys = SwpmMiscUtils::get_stripe_api_keys_from_payment_button( $button_id, ! $sandbox_enabled );
 
 
 
 
 
 
46
 
47
  // Include the Stripe library.
48
  SwpmMiscUtils::load_stripe_lib();
49
 
50
  try {
51
+ \Stripe\Stripe::setApiKey( $api_keys['secret'] );
52
 
53
  $events = \Stripe\Event::all(
54
  array(
126
 
127
  $payment_amount = floatval( $payment_amount );
128
 
129
+ $payment_amount = apply_filters( 'swpm_payment_amount_filter', $payment_amount, $button_id );
130
+
131
  $membership_level_id = get_post_meta( $button_id, 'membership_level_id', true );
132
 
133
  // Everything went ahead smoothly with the charge.
ipn/swpm-stripe-subscription-ipn.php CHANGED
@@ -18,7 +18,8 @@ class SwpmStripeSubscriptionIpnHandler {
18
  */
19
 
20
  if ( isset( $_GET['hook'] ) ) {
21
- // This is Webhook notification from Stripe
 
22
 
23
  // TODO: add Webhook Signing Secret verification
24
  // To do this, we need to get customer ID, retreive its details from Stripe, get button_id from metadata
@@ -35,7 +36,7 @@ class SwpmStripeSubscriptionIpnHandler {
35
  $event_json = json_decode( $input );
36
 
37
  $type = $event_json->type;
38
- SwpmLog::log_simple_debug( sprintf( 'Stripe subscription webhook received: %s. Checking if we need to handle this webhook.', $type ), true );
39
 
40
  if ( 'customer.subscription.deleted' === $type || 'charge.refunded' === $type ) {
41
  // Subscription expired or refunded event
@@ -52,10 +53,9 @@ class SwpmStripeSubscriptionIpnHandler {
52
  }
53
 
54
  if ( $type == 'customer.subscription.updated' ) {
55
- // Subscription updated
56
- //SwpmLog::log_simple_debug( sprintf( 'Stripe Subscription Webhook %s received. Processing request...', $type ), true );
57
 
58
- // Let's form minimal ipn_data array for swpm_handle_subsc_cancel_stand_alone
59
  $customer = $event_json->data->object->customer;
60
  $subscr_id = $event_json->data->object->id;
61
  $ipn_data = array();
@@ -65,12 +65,88 @@ class SwpmStripeSubscriptionIpnHandler {
65
  swpm_update_member_subscription_start_date_if_applicable( $ipn_data );
66
  }
67
 
68
- //End of the webhook notification execution.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  http_response_code( 200 ); // Tells Stripe we received this notification
70
  return;
71
  }
72
 
73
- //The following will get executed only for DIRECT post (not webhooks). So it is executed at the time of payment in the browser (via HTTP POST). When the "hook" query arg is not set.
74
 
75
  SwpmLog::log_simple_debug( 'Stripe subscription IPN received. Processing request...', true );
76
  // SwpmLog::log_simple_debug(print_r($_REQUEST, true), true);//Useful for debugging purpose
@@ -103,15 +179,12 @@ class SwpmStripeSubscriptionIpnHandler {
103
  // Sandbox and other settings
104
  $settings = SwpmSettings::get_instance();
105
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
106
- if ( $sandbox_enabled ) {
107
- SwpmLog::log_simple_debug( 'Sandbox payment mode is enabled. Using test API key details.', true );
108
- $secret_key = get_post_meta( $button_id, 'stripe_test_secret_key', true ); // Use sandbox API key
109
- } else {
110
- $secret_key = get_post_meta( $button_id, 'stripe_live_secret_key', true ); // Use live API key
111
- }
112
 
113
  // Set secret API key in the Stripe library
114
- \Stripe\Stripe::setApiKey( $secret_key );
115
 
116
  // Get the credit card details submitted by the form
117
  $token = $stripe_token;
@@ -131,7 +204,7 @@ class SwpmStripeSubscriptionIpnHandler {
131
  SwpmLog::log_simple_debug( 'Error occurred during Stripe Subscribe. ' . $e->getMessage(), false );
132
  $body = $e->getJsonBody();
133
  $error = $body['error'];
134
- $error_string = print_r( $error, true );
135
  SwpmLog::log_simple_debug( 'Error details: ' . $error_string, false );
136
  wp_die( esc_html( 'Stripe subscription Error! ' . $e->getMessage() . $error_string ) );
137
  }
18
  */
19
 
20
  if ( isset( $_GET['hook'] ) ) {
21
+ // This is Webhook notification from Stripe.
22
+ // This webhook is used for all recurring payment notification (Legacy and SCA ones).
23
 
24
  // TODO: add Webhook Signing Secret verification
25
  // To do this, we need to get customer ID, retreive its details from Stripe, get button_id from metadata
36
  $event_json = json_decode( $input );
37
 
38
  $type = $event_json->type;
39
+ SwpmLog::log_simple_debug( sprintf( 'Stripe subscription webhook received: %s. Checking if we need to handle this webhook.', $type ), true );
40
 
41
  if ( 'customer.subscription.deleted' === $type || 'charge.refunded' === $type ) {
42
  // Subscription expired or refunded event
53
  }
54
 
55
  if ( $type == 'customer.subscription.updated' ) {
56
+ // Subscription updated webhook
 
57
 
58
+ // Let's form minimal ipn_data array
59
  $customer = $event_json->data->object->customer;
60
  $subscr_id = $event_json->data->object->id;
61
  $ipn_data = array();
65
  swpm_update_member_subscription_start_date_if_applicable( $ipn_data );
66
  }
67
 
68
+ if ( $type === 'invoice.payment_succeeded' ) {
69
+
70
+ $billing_reason = isset( $event_json->data->object->billing_reason ) ? $event_json->data->object->billing_reason : '';
71
+ if ( $billing_reason == 'subscription_cycle' ) {
72
+ //This is recurring/subscription payment invoice
73
+ SwpmLog::log_simple_debug( sprintf( 'Stripe invoice.payment_succeeded webhook for subscription_cycle. This is a successful subscription charge. Capturing payment data.' ), true );
74
+
75
+ $sub_id = $event_json->data->object->subscription;
76
+ //$cust_id = $event_json->data->object->billing_reason;
77
+ //$date = $event_json->data->object->date;
78
+ $price_in_cents = $event_json->data->object->amount_paid; //amount in cents
79
+ $currency_code = $event_json->data->object->currency;
80
+
81
+ $zero_cents = unserialize( SIMPLE_WP_MEMBERSHIP_STRIPE_ZERO_CENTS );
82
+ if ( in_array( $currency_code, $zero_cents, true ) ) {
83
+ $payment_amount = $price_in_cents;
84
+ } else {
85
+ $payment_amount = $price_in_cents / 100;// The amount (in cents). This value is used in Stripe API.
86
+ }
87
+ $payment_amount = floatval( $payment_amount );
88
+
89
+ // Let's try to get first_name and last_name from full name
90
+ $full_name = $event_json->data->object->customer_name;
91
+ $name_pieces = explode( ' ', $full_name, 2 );
92
+ $first_name = $name_pieces[0];
93
+ if ( ! empty( $name_pieces[1] ) ) {
94
+ $last_name = $name_pieces[1];
95
+ }
96
+
97
+ //Retrieve the member record for this subscription
98
+ $member_record = SwpmMemberUtils::get_user_by_subsriber_id( $sub_id );
99
+ if ( $member_record ) {
100
+ // Found a member record
101
+ $member_id = $member_record->member_id;
102
+ $membership_level_id = $member_record->membership_level;
103
+ if ( empty( $first_name ) ) {
104
+ $first_name = $member_record->first_name;
105
+ }
106
+ if ( empty( $last_name ) ) {
107
+ $last_name = $member_record->last_name;
108
+ }
109
+ } else {
110
+ SwpmLog::log_simple_debug( 'Could not find an existing member record for the given subscriber ID: ' . $sub_id . '. This user profile may have been deleted.', false );
111
+ $member_id = '';
112
+ $membership_level_id = '';
113
+ }
114
+
115
+ //Create the custom field
116
+ $custom_field_value = 'subsc_ref=' . $membership_level_id;
117
+ $custom_field_value .= '&swpm_id=' . $member_id;
118
+
119
+ // Create the $ipn_data array.
120
+ $ipn_data = array();
121
+ $ipn_data['mc_gross'] = $payment_amount;
122
+ $ipn_data['first_name'] = $first_name;
123
+ $ipn_data['last_name'] = $last_name;
124
+ $ipn_data['payer_email'] = $event_json->data->object->customer_email;
125
+ $ipn_data['membership_level'] = $membership_level_id;
126
+ $ipn_data['txn_id'] = $event_json->data->object->charge;
127
+ $ipn_data['subscr_id'] = $sub_id;
128
+ $ipn_data['swpm_id'] = $member_id;
129
+ $ipn_data['ip'] = '';
130
+ $ipn_data['custom'] = $custom_field_value;
131
+ $ipn_data['gateway'] = 'stripe-sca-subs';
132
+ $ipn_data['status'] = 'subscription';
133
+
134
+ //TODO - Maybe handle the user access start date updating here (instead of "customer.subscription.updated" hook).
135
+ //swpm_update_member_subscription_start_date_if_applicable( $ipn_data );
136
+
137
+ // Save the transaction record
138
+ SwpmTransactions::save_txn_record( $ipn_data );
139
+ SwpmLog::log_simple_debug( 'Transaction data saved for Stripe subscription notification.', true );
140
+ }
141
+ }
142
+
143
+ //End of the webhook notification execution.
144
+ //Give 200 status then exit out.
145
  http_response_code( 200 ); // Tells Stripe we received this notification
146
  return;
147
  }
148
 
149
+ //The following will get executed only for DIRECT post (not webhooks). So it is executed at the time of payment in the browser (via HTTP POST). When the "hook" query arg is not set.
150
 
151
  SwpmLog::log_simple_debug( 'Stripe subscription IPN received. Processing request...', true );
152
  // SwpmLog::log_simple_debug(print_r($_REQUEST, true), true);//Useful for debugging purpose
179
  // Sandbox and other settings
180
  $settings = SwpmSettings::get_instance();
181
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
182
+
183
+ //API keys
184
+ $api_keys = SwpmMiscUtils::get_stripe_api_keys_from_payment_button( $button_id, ! $sandbox_enabled );
 
 
 
185
 
186
  // Set secret API key in the Stripe library
187
+ \Stripe\Stripe::setApiKey( $api_keys['secret'] );
188
 
189
  // Get the credit card details submitted by the form
190
  $token = $stripe_token;
204
  SwpmLog::log_simple_debug( 'Error occurred during Stripe Subscribe. ' . $e->getMessage(), false );
205
  $body = $e->getJsonBody();
206
  $error = $body['error'];
207
+ $error_string = wp_json_encode( $error );
208
  SwpmLog::log_simple_debug( 'Error details: ' . $error_string, false );
209
  wp_die( esc_html( 'Stripe subscription Error! ' . $e->getMessage() . $error_string ) );
210
  }
languages/simple-membership-ja.mo CHANGED
Binary file
languages/simple-membership-ja.po CHANGED
@@ -2,1399 +2,3100 @@
2
  # This file is distributed under the same license as the Plugins - Simple Membership - Development (trunk) package.
3
  msgid ""
4
  msgstr ""
5
- "PO-Revision-Date: 2019-06-13 17:28+0900\n"
 
 
 
 
 
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
9
  "Plural-Forms: nplurals=1; plural=0;\n"
10
- "X-Generator: Poedit 2.2.3\n"
11
- "Language: ja_JP\n"
12
- "Project-Id-Version: Plugins - Simple Membership - Development (trunk)\n"
13
- "POT-Creation-Date: \n"
14
- "Last-Translator: \n"
15
- "Language-Team: \n"
16
 
17
- #. Author of the plugin/theme
18
- msgid "smp7, wp.insider"
19
- msgstr "smp7, wp.insider"
 
 
20
 
21
- #. Description of the plugin/theme
22
- msgid "A flexible, well-supported, and easy-to-use WordPress membership plugin for offering free and premium content from your WordPress site."
23
- msgstr "WordPress サイトから無料で提供されている、柔軟で、よくサポートされ、使いやすい WordPress メンバーシッププラグイン。"
24
 
25
- #. #-#-#-#-# tmp-simple-membership.pot (Simple WordPress Membership 3.1.1)
26
- #. Plugin URI of the plugin/theme
27
- #. #-#-#-#-# tmp-simple-membership.pot (Simple WordPress Membership 3.1.1)
28
- #. Author URI of the plugin/theme
29
- msgid "https://simple-membership-plugin.com/"
30
- msgstr "https://simple-membership-plugin.com/"
31
 
32
- #. Plugin Name of the plugin/theme
33
- msgid "Simple WordPress Membership"
34
- msgstr "Simple WordPress Membership"
 
 
 
 
35
 
36
- #: views/payments/payment-gateway/paypal_button_shortcode_view.php:197
37
- #: views/payments/payment-gateway/paypal_button_shortcode_view.php:199
38
- msgid "Subscribe Now"
39
- msgstr "今すぐ購読する"
 
 
 
 
40
 
41
- #: views/payments/payment-gateway/paypal_button_shortcode_view.php:77
42
- #: views/payments/payment-gateway/paypal_button_shortcode_view.php:79
43
- msgid "Buy Now"
44
- msgstr "購入する"
 
 
 
45
 
46
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:167
47
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:440
48
- msgid "Optional Details"
49
- msgstr "設定の詳細"
 
 
 
50
 
51
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:150
52
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:423
53
- msgid "Trial Billing Period"
54
- msgstr "トライアル請求期間"
55
 
56
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:142
57
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:415
58
- msgid "Trial Billing Amount"
59
- msgstr "トライアル請求金額"
60
 
61
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:136
62
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:409
63
- msgid "Trial Billing Details (Leave empty if you are not offering a trial period)"
64
- msgstr "トライアル請求詳細(もしトライアル期間を設定していなければ空欄にすること)"
 
 
 
65
 
66
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:123
67
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:396
68
- msgid "Re-attempt on Failure"
69
- msgstr "失敗時の再試行"
70
 
71
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:115
72
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:388
73
- msgid "Billing Cycle Count"
74
- msgstr "請求サイクルカウント"
75
 
76
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:102
77
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:375
78
- msgid "Billing Cycle"
79
- msgstr "請求サイクル"
80
 
81
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:94
82
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:367
83
- msgid "Billing Amount Each Cycle"
84
- msgstr "各サイクルの請求額"
85
 
86
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:20
87
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:288
88
- msgid "PayPal Subscription Button Configuration"
89
- msgstr "PayPal 購読ボタンの設定"
90
 
91
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:201
92
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:294
93
- msgid "Button ID"
94
- msgstr "ボタン ID"
95
 
96
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:119
97
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:300
98
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:193
99
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:466
100
- msgid "Save Payment Data"
101
- msgstr "支払データ保存"
102
 
103
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:109
104
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:290
105
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:181
106
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:454
107
- msgid "Button Image URL"
108
- msgstr "ボタン画像 URL"
109
 
110
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:101
111
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:282
112
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:86
113
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:359
114
- msgid "PayPal Email"
115
- msgstr "PayPal メール"
116
 
117
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:93
118
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:274
119
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:173
120
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:446
121
- msgid "Return URL"
122
- msgstr "リターン URL"
123
 
124
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:54
125
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:235
126
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:47
127
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:320
128
- msgid "Payment Currency"
129
- msgstr "支払通貨"
130
 
131
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:46
132
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:227
133
- msgid "Payment Amount"
134
- msgstr "支払金額"
135
 
136
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:28
137
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:209
138
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:29
139
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:302
140
- msgid "Button Title"
141
- msgstr "ボタンタイトル"
142
 
143
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:18
144
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:192
145
- msgid "PayPal Buy Now Button Configuration"
146
- msgstr "PayPal 購入ボタン設定"
147
 
148
- #: views/payments/admin_payment_buttons.php:7
149
- msgid "All the membership buttons that you created in the plugin are displayed here."
150
- msgstr "作成した会員メンバーのボタンはこちらに表示されます。"
151
 
152
- #: views/payments/admin_edit_payment_buttons.php:12
153
- msgid "You can edit a payment button using this interface."
154
- msgstr "この画面より支払ボタンを編集できます。"
155
 
156
- #: views/payments/admin_create_payment_buttons.php:34
157
- msgid "Next"
158
- msgstr ""
159
 
160
- #: views/payments/admin_create_payment_buttons.php:22
161
- msgid "Select Payment Button Type"
162
- msgstr "支払ボタンの種類選択"
163
 
164
- #: views/payments/admin_create_payment_buttons.php:13
165
- msgid "You can create new payment button for your memberships using this interface."
166
- msgstr "この画面からメンバーシップの新しい支払いボタンを作成することができます。"
167
 
168
- #: views/login.php:24
169
- msgid "Forgot Password"
170
- msgstr "パスワードを忘れた"
 
171
 
172
- #: views/login.php:18
173
- msgid "Remember Me"
174
- msgstr "ログイン情報を保存"
 
 
 
 
175
 
176
- #: views/loggedin.php:19
177
- msgid "Logout"
178
- msgstr "ログアウト"
179
 
180
- #: views/loggedin.php:15
181
- msgid "Account Expiry"
182
- msgstr "アカウントの有効期限"
183
 
184
- #: views/loggedin.php:11
185
- msgid "Membership"
186
- msgstr "メンバーシップ"
187
 
188
- #: views/loggedin.php:3
189
- msgid "Logged in as"
190
- msgstr "ログイン中: "
 
191
 
192
- #: views/forgot_password.php:12
193
- msgid "Reset Password"
194
- msgstr "パスワードリセット"
 
 
195
 
196
- #: views/edit.php:58
197
- msgid "Update"
198
- msgstr "更新"
 
199
 
200
- #: views/admin_tools_settings.php:34
201
- msgid "Submit"
202
- msgstr "送信"
 
203
 
204
- #: views/admin_tools_settings.php:31
205
- msgid "Send Registration Reminder Email too"
206
- msgstr "登録通知の電子メールを送信する"
207
 
208
- #: views/admin_tools_settings.php:24
209
- msgid "Registration Completion Links Will Appear Below:"
210
- msgstr "登録完了リンクが下に表示されます: "
211
 
212
- #: views/admin_tools_settings.php:21
213
- msgid "For All Pending Registrations"
214
- msgstr "保留中のすべての登録"
215
 
216
- #: views/admin_tools_settings.php:20
217
- msgid "OR"
218
- msgstr "OR"
219
 
220
- #: views/admin_tools_settings.php:17
221
- msgid "Generate Registration Completion Link"
222
- msgstr "登録完了リンクを生成する"
 
 
 
 
223
 
224
- #: views/admin_tools_settings.php:12
225
- msgid "You can manually generate a registration completion link here and give it to your customer if they have missed the email that was automatically sent out to them after the payment."
226
- msgstr "支払い後に自動的に送信されたメールが紛失した場合、ここで手動で登録完了リンクを生成し、会員に渡すことができます。"
227
 
228
- #: views/admin_tools_settings.php:9
229
- msgid "Generate a Registration Completion link"
230
- msgstr "登録完了リンクを生成する"
231
 
232
- #: views/admin_payments_page.php:22
233
- #: views/payments/admin_all_payment_transactions.php:18
234
- msgid "Search"
235
- msgstr "検索"
236
 
237
- #: views/admin_payments_page.php:18
238
- #: views/payments/admin_all_payment_transactions.php:14
239
- msgid "Search for a transaction by using email or name"
240
- msgstr "メールまたは名前を使ってトランザクションを検索する"
241
 
242
- #: views/admin_payments_page.php:11
243
- #: views/payments/admin_all_payment_transactions.php:7
244
- msgid "All the payments/transactions of your members are recorded here."
245
- msgstr "会員のすべての支払い / 取引がここに記録されます。"
246
 
247
- #: views/admin_payments_page.php:5 views/payments/admin_payments_page.php:9
248
- msgid "Simple Membership::Payments"
249
- msgstr "Simple Membership::支払"
250
 
251
- #: views/admin_payment_settings.php:41
252
- #: views/payments/admin_payment_settings.php:39
253
- msgid "Generate Code"
254
- msgstr "コードを生成する"
 
 
 
255
 
256
- #: views/admin_payment_settings.php:39
257
- #: views/payments/admin_payment_settings.php:37
258
- msgid "Enter the Membership Level ID"
259
- msgstr "会員ランク ID を入力してください"
260
 
261
- #: views/admin_payment_settings.php:36
262
- #: views/payments/admin_payment_settings.php:34
263
- msgid "Generate the \"Advanced Variables\" Code for your PayPal button"
264
- msgstr "PayPal ボタンの「詳細変数」コードを生成する"
265
 
266
- #: views/admin_payment_settings.php:33
267
- #: views/payments/admin_payment_settings.php:31
268
- msgid "PayPal Integration Settings"
269
- msgstr "PayPal の統合設定"
 
 
 
270
 
271
- #: views/admin_membership_manage.php:17
272
- msgid "Example Content Protection Settings"
273
- msgstr "コンテンツ保護の設定例"
 
 
 
 
274
 
275
- #: views/admin_membership_levels.php:2
276
- msgid "Simple WP Membership::Membership Levels"
277
- msgstr "Simple WP Membership::会員ランク"
 
 
 
 
278
 
279
- #: views/admin_membership_level_menu.php:4
280
- msgid "Category Protection"
281
- msgstr "カテゴリー保護"
282
 
283
- #: views/admin_membership_level_menu.php:3
284
- msgid "Manage Content Production"
285
- msgstr "コンテンツ制作の管理"
286
 
287
- #: views/admin_membership_level_menu.php:2
288
- msgid "Membership level"
289
- msgstr "会員ランク"
290
 
291
- #: views/admin_members_list.php:6 views/admin_membership_levels.php:12
292
- msgid "search"
293
- msgstr "検索"
294
 
295
- #: views/admin_members.php:3 views/admin_members_list.php:30
296
- msgid "Add New"
297
- msgstr "新規追加"
298
 
299
- #: views/admin_members.php:2
300
- msgid "Simple WP Membership::Members"
301
- msgstr "Simple WP Membership::会員メンバー"
302
 
303
- #: views/admin_member_form_common_part.php:58
304
- msgid "Member Since"
305
- msgstr "会員登録日"
 
 
 
 
 
306
 
307
- #: views/admin_member_form_common_part.php:54
308
- msgid "Company"
309
- msgstr "会社"
 
 
 
310
 
311
- #: views/admin_member_form_common_part.php:50 views/edit.php:48
312
- msgid "Country"
313
- msgstr ""
314
 
315
- #: views/admin_member_form_common_part.php:46 views/edit.php:44
316
- msgid "Zipcode"
317
- msgstr "郵便番号"
318
 
319
- #: views/admin_member_form_common_part.php:42 views/edit.php:40
320
- msgid "State"
321
- msgstr "都道府県"
322
 
323
- #: views/admin_member_form_common_part.php:38 views/edit.php:36
324
- msgid "City"
325
- msgstr "市区町村"
326
 
327
- #: views/admin_member_form_common_part.php:34 views/edit.php:32
328
- msgid "Street"
329
- msgstr "番地"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
 
331
- #: views/admin_member_form_common_part.php:30 views/edit.php:28
332
- msgid "Phone"
333
- msgstr "電話番号"
334
 
335
- #: views/admin_member_form_common_part.php:23
336
- msgid "Gender"
337
- msgstr "性別"
338
 
339
- #: views/admin_edit_level.php:41
340
- msgid "Edit Membership Level "
341
- msgstr "会員ランクの編集"
342
 
343
- #: views/admin_edit_level.php:26
344
- msgid "Weeks (Access expires after given number of weeks)"
345
- msgstr "週(指定した数の週の間有効)"
346
 
347
- #: views/admin_edit_level.php:21
348
- msgid "No Expiry (Access for this level will not expire until cancelled)"
349
- msgstr "無期限(キャンセルしない限り有効)"
350
 
351
- #: views/admin_edit_level.php:6
352
- msgid "Edit membership level."
353
- msgstr "会員レベルの編集"
354
 
355
- #: views/admin_edit_level.php:5
356
- msgid "Edit membership level"
357
- msgstr "会員レベルの編集"
358
 
359
- #: views/admin_edit.php:52
360
- msgid "Edit User "
361
- msgstr "ユーザーの編集"
362
 
363
- #: views/admin_edit.php:44
364
- msgid "Last Accessed From IP"
365
- msgstr "最終アクセス日時"
366
 
367
- #: views/admin_edit.php:40
368
- msgid "Subscriber ID/Reference"
369
- msgstr "購読者 ID/参照"
370
 
371
- #: views/admin_edit.php:33
372
- msgid "Notify User"
373
- msgstr "会員に知らせる"
 
 
 
374
 
375
- #. translators: password input field
376
- #: views/admin_edit.php:17
377
- msgid "(twice, leave empty to retain old password)"
378
- msgstr "(二度入力。同じパスワードを利用する場合は空欄にする。)"
 
 
 
 
 
379
 
380
- #: views/admin_edit.php:9 views/login.php:5
381
- msgid "Username"
382
- msgstr "ユーザー名"
 
 
 
383
 
384
- #: views/admin_edit.php:6
385
- msgid "Edit existing member details."
386
- msgstr "既存会員の詳細を編集"
 
 
 
 
 
 
387
 
388
- #: views/admin_edit.php:5
389
- msgid "Edit Member"
390
- msgstr "メンバーの編集"
391
 
392
- #: views/admin_category_list.php:10
393
- msgid "Next, select an existing membership level from the drop-down box below and then select the categories you want to grant access to (for that particular membership level)."
394
- msgstr "次にドロップダウンメニューから既存の会員レベルを選択し、その会員レベルのユーザーにのみ公開するカテゴリーを選びます。"
395
 
396
- #: views/admin_category_list.php:7
397
- msgid "First of all, globally protect the category on your site by selecting \"General Protection\" from the drop-down box below and then select the categories that should be protected from non-logged in users."
398
- msgstr "まず、ドロップダウンメニューからGeneral Protectionを選び、ログインしていないユーザーに非公開にするカテゴリーを選択します。"
399
 
400
- #: views/admin_category_list.php:2
401
- msgid "Simple WP Membership::Categories"
402
- msgstr "Simple WP Membership::カテゴリー"
403
 
404
- #: views/admin_addon_settings.php:13
405
- msgid "Save Changes"
406
- msgstr "変更を保存"
407
 
408
- #: views/admin_addon_settings.php:8
409
- msgid "Some of the simple membership plugin's addon settings and options will be displayed here (if you have them)"
410
- msgstr "アドオンの設定やオプションがここに表示されます。"
411
 
412
- #: views/admin_addon_settings.php:3 views/admin_payment_settings.php:2
413
- #: views/admin_settings.php:3 views/admin_tools_settings.php:3
414
- #: views/payments/admin_payment_settings.php:3
415
- msgid "Simple WP Membership::Settings"
416
- msgstr "Simple WP Membership::設定"
417
 
418
- #: views/admin_add_ons_page.php:7
419
- msgid "Simple WP Membership::Add-ons"
420
- msgstr "Simple WP Membership::アドオン"
421
 
422
- #: views/admin_add_level.php:38
423
- msgid "Add New Membership Level "
424
- msgstr "新規メンバーシップレベルの追加"
425
 
426
- #: views/admin_add_level.php:32 views/admin_edit_level.php:35
427
- msgid "(Access expires on a fixed date)"
428
- msgstr "(指定した日付まで有効)"
429
 
430
- #: views/admin_add_level.php:31 views/admin_edit_level.php:34
431
- msgid "Fixed Date Expiry"
432
- msgstr "有効期限を指定"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
433
 
434
- #: views/admin_add_level.php:30 views/admin_edit_level.php:32
435
- msgid "Years (Access expires after given number of years)"
436
- msgstr "年(指定した数の年の間有効)"
437
 
438
- #: views/admin_add_level.php:28 views/admin_edit_level.php:29
439
- msgid "Months (Access expires after given number of months)"
440
- msgstr "ヶ月(指定した数の月の間有効)"
441
 
442
- #: views/admin_add_level.php:26
443
- msgid "Weeks (Access expires after given number of weeks"
444
- msgstr "週(指定した数の週の間有効)"
445
 
446
- #: views/admin_add_level.php:24 views/admin_edit_level.php:23
447
- msgid "Days (Access expires after given number of days)"
448
- msgstr "日(指定した日数で有効)"
449
 
450
- #: views/admin_add_level.php:23 views/admin_add_level.php:25
451
- #: views/admin_add_level.php:27 views/admin_add_level.php:29
452
- #: views/admin_edit_level.php:22 views/admin_edit_level.php:25
453
- #: views/admin_edit_level.php:28 views/admin_edit_level.php:31
454
- msgid "Expire After"
455
  msgstr "有効期限"
456
 
457
- #: views/admin_add_level.php:22
458
  msgid "No Expiry (Access for this level will not expire until cancelled"
459
  msgstr "無期限(キャンセルしない限り有効)"
460
 
461
- #: views/admin_add_level.php:19 views/admin_edit_level.php:18
462
- msgid "Access Duration"
 
 
 
463
  msgstr "有効期限"
464
 
465
- #: views/admin_add_level.php:15 views/admin_edit_level.php:14
466
- msgid "Default WordPress Role"
467
- msgstr "WordPress のデフォルトユーザー権限"
468
 
469
- #: views/admin_add_level.php:11 views/admin_edit_level.php:10
470
- msgid "Membership Level Name"
471
- msgstr "会員レベル名"
472
 
473
- #: views/admin_add_level.php:6
474
- msgid "Create new membership level."
475
- msgstr "新規会員レベルを作成"
476
 
477
- #: views/admin_add.php:39
478
- msgid "Add New Member "
479
- msgstr "新規メンバーの追加"
480
 
481
- #: views/admin_add.php:29 views/admin_edit.php:26 views/loggedin.php:7
482
- msgid "Account Status"
483
- msgstr "アカウント状態"
484
 
485
- #: views/admin_add.php:25 views/admin_edit.php:22
486
- msgid "Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! \" ? $ % ^ &amp; )."
487
- msgstr "ヒント: パスワードは7文字以上。より強いパスワードにするために、大文字・小文字を使い、数字や ! \\\" ? $ % ^ &amp; ) 等の記号の使用を推奨します。"
488
 
489
- #: views/admin_add.php:24 views/admin_edit.php:21
490
- msgid "Strength indicator"
491
- msgstr "強度の指標"
492
 
493
- #. translators: password input field
494
- #: views/admin_add.php:19
495
- msgid "(twice, required)"
496
- msgstr "(二度入力、必須)"
 
 
 
 
 
497
 
498
- #: views/admin_add.php:15 views/admin_edit.php:13
499
- msgid "E-mail"
500
- msgstr "メール"
501
 
502
- #: views/admin_add.php:11 views/admin_add.php:15 views/admin_add_level.php:11
503
- #: views/admin_add_level.php:15 views/admin_add_level.php:19
504
- #: views/admin_edit.php:9 views/admin_edit.php:13 views/admin_edit_level.php:10
505
- #: views/admin_edit_level.php:14 views/admin_edit_level.php:18
506
- msgid "(required)"
507
- msgstr "(必須)"
508
 
509
- #: views/admin_add.php:11
510
- msgid "User name"
511
- msgstr "ユーザー名"
 
 
 
 
512
 
513
- #: views/admin_add.php:7
514
- msgid "Create a brand new user and add it to this site."
515
- msgstr "新しいユーザーを作成し、このサイトに追加します。"
516
 
517
- #: views/admin_add.php:6
518
- msgid "Add Member"
519
- msgstr "メンバーの追加"
520
 
521
- #: views/add.php:41
522
- msgid "Register"
523
- msgstr "登録"
 
 
 
 
 
 
524
 
525
- #: views/add.php:18 views/edit.php:16
526
- msgid "Repeat Password"
527
- msgstr "パスワードを再入力"
 
 
 
 
 
528
 
529
- #: views/add.php:14 views/admin_add.php:19 views/admin_edit.php:17
530
- #: views/edit.php:12 views/login.php:11
531
- msgid "Password"
532
- msgstr "パスワード"
533
 
534
- #: classes/shortcode-related/class.swpm-shortcodes-handler.php:66
535
- msgid "If you have just made a membership payment then your payment is yet to be processed. Please check back in a few minutes. An email will be sent to you with the details shortly."
536
- msgstr "会員登録のためのお支払い手続きの処理中です。数分後にもう一度ご確認ください。後ほど詳細についてメールが送付されます。"
537
 
538
- #: classes/shortcode-related/class.swpm-shortcodes-handler.php:61
539
- msgid "Click here to complete your paid registration"
540
- msgstr "こちらのリンクをクリックして支払い手続きを完了してください。"
541
 
542
- #: classes/shortcode-related/class.swpm-shortcodes-handler.php:60
543
- msgid "Click on the following link to complete the registration."
544
- msgstr "以下のリンクをクリックして会員登録を完了してください。"
545
 
546
- #: classes/shortcode-related/class.swpm-shortcodes-handler.php:48
547
- msgid "Your profile username: "
548
- msgstr "あなたのユーザー名:"
 
549
 
550
- #: classes/shortcode-related/class.swpm-shortcodes-handler.php:47
551
- msgid "Your membership profile will be updated to reflect the payment."
552
- msgstr "会員プロフィールが更新されました。"
553
-
554
- #: classes/common/class-swpm-list-table.php:876
555
- #: classes/common/class.swpm-list-table.php:848
556
- msgid "Select All"
557
- msgstr "すべて選択"
558
-
559
- #: classes/common/class-swpm-list-table.php:739
560
- #: classes/common/class.swpm-list-table.php:713
561
- msgid "Go to the last page"
562
- msgstr "最後のページに移動"
563
-
564
- #: classes/common/class-swpm-list-table.php:732
565
- #: classes/common/class.swpm-list-table.php:710
566
- msgid "Go to the next page"
567
- msgstr "次のページに進む"
568
-
569
- #: classes/common/class-swpm-list-table.php:728
570
- #: classes/common/class.swpm-list-table.php:708
571
- msgctxt "paging"
572
- msgid "%1$s of %2$s"
573
- msgstr "%2$s中%1$s"
574
-
575
- #: classes/common/class-swpm-list-table.php:722
576
- #: classes/common/class.swpm-list-table.php:704
577
- msgid "Current page"
578
- msgstr "現在のページ"
579
-
580
- #: classes/common/class-swpm-list-table.php:721
581
- #: classes/common/class.swpm-list-table.php:704
582
- msgid "Select Page"
583
- msgstr "ページを選択"
584
-
585
- #: classes/common/class-swpm-list-table.php:712
586
- #: classes/common/class.swpm-list-table.php:698
587
- msgid "Go to the previous page"
588
- msgstr "前のページに戻る"
589
-
590
- #: classes/common/class-swpm-list-table.php:705
591
- #: classes/common/class.swpm-list-table.php:695
592
- msgid "Go to the first page"
593
- msgstr "最初のページに戻る"
594
-
595
- #: classes/common/class-swpm-list-table.php:686
596
- #: classes/common/class-swpm-list-table.php:1110
597
- #: classes/common/class.swpm-list-table.php:678
598
- #: classes/common/class.swpm-list-table.php:1086
599
- msgid "1 item"
600
- msgid_plural "%s items"
601
- msgstr[0] "%s 件"
602
-
603
- #: classes/common/class-swpm-list-table.php:607
604
- #: classes/common/class.swpm-list-table.php:599
605
- msgid "%s pending"
606
- msgstr "%s 保留中"
607
-
608
- #. translators: 1: month name, 2: 4-digit year
609
- #: classes/common/class-swpm-list-table.php:560
610
- #: classes/common/class.swpm-list-table.php:555
611
- msgid "%1$s %2$d"
612
- msgstr "%1$s %2$d"
613
-
614
- #: classes/common/class-swpm-list-table.php:547
615
- #: classes/common/class.swpm-list-table.php:545
616
- msgid "All dates"
617
- msgstr "すべての日付"
618
-
619
- #: classes/common/class-swpm-list-table.php:545
620
- #: classes/common/class.swpm-list-table.php:543
621
- msgid "Filter by date"
622
- msgstr "日付によるフィルター"
623
-
624
- #: classes/common/class-swpm-list-table.php:445
625
- #: classes/common/class.swpm-list-table.php:443
626
- msgid "Apply"
627
- msgstr "適用"
628
-
629
- #: classes/common/class-swpm-list-table.php:435
630
- #: classes/common/class.swpm-list-table.php:433
631
- msgid "Bulk Actions"
632
- msgstr "一括操作"
633
 
634
- #: classes/common/class-swpm-list-table.php:433
635
- #: classes/common/class.swpm-list-table.php:431
636
- msgid "Select bulk action"
637
- msgstr "一括操作を選択"
638
 
639
- #: classes/common/class-swpm-list-table.php:307
640
- #: classes/common/class.swpm-list-table.php:305
641
- msgid "No items found."
642
- msgstr "アイテムが見つかりません。"
643
 
644
- #: classes/common/class-swpm-list-table.php:140
645
- #: classes/common/class.swpm-list-table.php:138
646
- msgid "Excerpt View"
647
- msgstr "抜粋を表示"
648
 
649
- #: classes/common/class-swpm-list-table.php:139
650
- #: classes/common/class.swpm-list-table.php:137
651
- msgid "List View"
652
- msgstr "リストを表示"
 
 
 
653
 
654
- #: classes/class.swpm-settings.php:124
655
- msgid "Email Settings (Password Reset)"
656
- msgstr "メール設定(パスワードリセット)"
657
 
658
- #: classes/class.swpm-settings.php:120
659
- msgid "Enter the email address where you want the admin notification email to be sent to."
660
- msgstr "送信したい管理者のメールアドレスを入力してください。"
661
 
662
- #: classes/class.swpm-settings.php:119
663
- msgid "Admin Email Address"
664
- msgstr "管理者のメールアドレス"
665
 
666
- #: classes/class.swpm-settings.php:118
667
- msgid "Enable this option if you want the admin to receive a notification when a member registers."
668
- msgstr "メンバー登録通知を管理者が受信したい場合は、このオプションを有効にします。"
 
 
 
 
669
 
670
- #: classes/class.swpm-settings.php:117
671
- msgid "Send Notification to Admin"
672
- msgstr "管理者に通知を送信"
673
 
674
- #: classes/class.swpm-settings.php:22
675
- msgid "Addons Settings"
676
- msgstr "アドオンの設定"
677
 
678
- #: classes/class.swpm-settings.php:22
679
- msgid "Tools"
680
- msgstr "ツール"
681
 
682
- #: classes/class.swpm-settings.php:22
683
- msgid "Email Settings"
684
- msgstr "メール設定"
685
 
686
- #: classes/class.swpm-settings.php:21
687
- msgid "Payment Settings"
688
- msgstr "支払い設定"
689
 
690
- #: classes/class.swpm-init-time-tasks.php:115
691
- msgid "Sorry, Password didn't match."
692
- msgstr "パスワードが一致してません。"
693
 
694
- #: classes/class.swpm-init-time-tasks.php:108
695
- msgid "Sorry, Nonce verification failed."
696
- msgstr "認証に失敗しました。"
697
 
698
- #: classes/class.swpm-front-registration.php:200
699
- msgid "No user found with that email address."
700
- msgstr "メールアドレスに該当するユーザーが見つかりませんでした。"
 
701
 
702
- #: classes/class.swpm-front-registration.php:170
703
- msgid "Profile updated successfully. You will need to re-login since you changed your password."
704
- msgstr "プロフィールが更新されました。再度ログインが必要です。"
705
 
706
- #: classes/class.swpm-front-registration.php:162
707
- msgid "Profile updated successfully."
708
- msgstr "プロフィールが更新されました。"
709
 
710
- #: classes/class.swpm-front-registration.php:71
711
- msgid "Security check: captcha validation failed."
712
- msgstr "セキュリティチェック: キャプチャ認証に失敗しました。"
713
 
714
- #: classes/class.swpm-category-list.php:80
715
- msgid "Category protection updated!"
716
- msgstr "限定カテゴリを更新しました。"
 
 
 
 
 
 
717
 
718
- #: classes/class.swpm-auth.php:227
719
- msgid "Please login again."
720
- msgstr "再度ログインしてください。"
721
 
722
- #: classes/class.swpm-admin-registration.php:91
723
- msgid "Your current password"
724
- msgstr "現在のパスワード"
725
 
726
- #: classes/class.swpm-admin-registration.php:54
727
- msgid "Member record added successfully."
728
- msgstr "会員情報が追加されました。"
729
 
730
- #: classes/class.simple-wp-membership.php:468
731
- msgid "Add-ons"
732
- msgstr "アドオン"
733
 
734
- #: classes/class.simple-wp-membership.php:467
735
- msgid "Payments"
736
- msgstr "支払い"
 
737
 
738
- #: classes/class.simple-wp-membership.php:466
739
- msgid "Settings"
740
- msgstr "設定"
 
741
 
742
- #: classes/class.simple-wp-membership.php:463
743
- msgid "WP Membership"
744
- msgstr "WP Membership"
745
 
746
- #: classes/class.simple-wp-membership.php:330
747
- msgid "Select the membership level that can access this content:"
748
- msgstr "このコンテンツを閲覧できる会員レベルを選択してください:"
749
 
750
- #: classes/class.simple-wp-membership.php:325
751
- msgid "Do you want to protect this content?"
752
- msgstr "このコンテンツを限定公開にしますか ?"
753
 
754
- #: classes/class.simple-wp-membership.php:309
755
- msgid "Simple Membership Protection options"
756
- msgstr "Simple WP Membership プロテクション設定"
757
 
758
- #: classes/class.simple-wp-membership.php:297
759
- msgid "Simple WP Membership Protection"
760
- msgstr "Simple WP Membership プロテクション"
 
761
 
762
- #: classes/class.simple-wp-membership.php:263
763
- msgid "You are not logged in."
764
- msgstr "ログインしていません。"
 
765
 
766
- #: classes/class.miscUtils.php:119 classes/class.swpm-misc-utils.php:119
767
- msgid "Password Reset"
768
- msgstr "パスワードのリセット"
 
769
 
770
- #: classes/class.miscUtils.php:96 classes/class.swpm-misc-utils.php:96
771
- msgid "Profile"
772
- msgstr "プロフィール"
 
 
 
 
 
 
773
 
774
- #: classes/class.miscUtils.php:73 classes/class.swpm-misc-utils.php:73
775
- msgid "Member Login"
776
- msgstr "メンバーログイン"
 
 
 
 
 
777
 
778
- #: classes/class.miscUtils.php:50 classes/class.swpm-misc-utils.php:50
779
- msgid "Registration"
780
- msgstr "登録"
781
 
782
- #: classes/class.bUtils.php:358 classes/class.swpm-utils.php:371
783
- msgid "Delete Account"
784
- msgstr "アカウントの削除"
785
 
786
- #: classes/class.bUtils.php:301 classes/class.swpm-utils.php:297
787
- msgid "Never"
788
- msgstr "期限なし"
789
 
790
- #: classes/class.bUtils.php:75 classes/class.swpm-utils.php:70
791
- msgid "Expired"
792
- msgstr "期限切れ"
793
 
794
- #: classes/class.bUtils.php:74 classes/class.swpm-utils.php:69
795
- msgid "Pending"
796
- msgstr "保留"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
797
 
798
- #: classes/class.bUtils.php:73 classes/class.swpm-utils.php:68
799
- msgid "Inactive"
800
- msgstr "停止中"
801
 
802
- #: classes/class.bUtils.php:72 classes/class.swpm-utils.php:67
803
- msgid "Active"
804
- msgstr "有効"
805
 
806
- #: classes/class.bSettings.php:392 classes/class.swpm-settings.php:377
807
- #: views/login.php:27
808
- msgid "Join Us"
809
- msgstr "会員について"
810
 
811
- #: classes/class.bSettings.php:392 classes/class.swpm-settings.php:377
812
- msgid "Not a Member?"
813
- msgstr "あなたは会員ですか ?"
814
 
815
- #: classes/class.bSettings.php:274 classes/class.swpm-settings.php:97
816
- #: classes/class.swpm-settings.php:145 classes/class.swpm-settings.php:243
817
- msgid "Settings updated!"
818
- msgstr "設定を更新しました。"
819
 
820
- #: classes/class.bSettings.php:186 classes/class.swpm-settings.php:153
821
- msgid "When enabled, expired members will be able to log into the system but won't be able to view any protected content. This allows them to easily renew their account by making another payment."
822
- msgstr "この機能を有効にした場合、ログインはできるが会員限定コンテンツは閲覧できません。"
823
 
824
- #: classes/class.bSettings.php:183 classes/class.swpm-settings.php:152
825
- msgid "Enable Expired Account Login"
826
- msgstr "有効期限切れのアカウントのログインを有効にする"
827
 
828
- #: classes/class.bSettings.php:180 classes/class.swpm-settings.php:22
829
- #: classes/class.swpm-settings.php:150
830
- msgid "Advanced Settings"
831
- msgstr "詳細設定"
832
 
833
- #: classes/class.bSettings.php:162 classes/class.swpm-settings.php:131
834
- msgid " Email Settings (Account Upgrade Notification)"
835
- msgstr "メール設定(会員レベルのアップグレードのお知らせ)"
836
 
837
- #: classes/class.bSettings.php:157 classes/class.swpm-settings.php:121
838
- msgid "Send Email to Member When Added via Admin Dashboard"
839
- msgstr "管理者の管理画面から会員登録した場合、登録された会員宛てにメールする。"
 
 
 
 
840
 
841
- #: classes/class.bSettings.php:153
842
- msgid "Send Notification To Admin"
843
- msgstr "管理者に知らせる"
844
 
845
- #: classes/class.bSettings.php:143 classes/class.swpm-settings.php:112
846
- msgid "Email Settings (Registration Complete)"
847
- msgstr "メール設定(登録完了)"
848
 
849
- #: classes/class.bSettings.php:138 classes/class.bSettings.php:149
850
- #: classes/class.bSettings.php:168 classes/class.swpm-settings.php:109
851
- #: classes/class.swpm-settings.php:115 classes/class.swpm-settings.php:127
852
- #: classes/class.swpm-settings.php:134
853
- msgid "Email Body"
854
- msgstr "メール内容"
855
 
856
- #: classes/class.bSettings.php:134 classes/class.bSettings.php:145
857
- #: classes/class.bSettings.php:164 classes/class.swpm-settings.php:107
858
- #: classes/class.swpm-settings.php:113 classes/class.swpm-settings.php:125
859
- #: classes/class.swpm-settings.php:132
860
- msgid "Email Subject"
861
- msgstr "メール件名"
862
 
863
- #: classes/class.bSettings.php:132 classes/class.swpm-settings.php:106
864
- msgid "Email Settings (Prompt to Complete Registration )"
865
- msgstr "メール設定(登録完了のお知らせ)"
866
 
867
- #: classes/class.bSettings.php:127 classes/class.swpm-settings.php:103
868
- msgid "From Email Address"
869
- msgstr "送信元メールアドレス"
 
 
 
 
 
870
 
871
- #: classes/class.bSettings.php:125 classes/class.swpm-settings.php:102
872
- msgid "Email Misc. Settings"
873
- msgstr "メール設定"
 
 
 
 
 
 
 
 
874
 
875
- #: classes/class.bSettings.php:105 classes/class.swpm-settings.php:81
876
- msgid "Check this option to enable debug logging."
877
- msgstr "デバッグログを有効にする場合はチェック"
 
 
 
 
 
878
 
879
- #: classes/class.bSettings.php:102 classes/class.swpm-settings.php:79
880
- msgid "Test & Debug Settings"
881
- msgstr "テスト & デバッグ設定"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
882
 
883
- #: classes/class.bSettings.php:97 classes/class.swpm-settings.php:76
884
- msgid "Password Reset Page URL"
885
- msgstr "パスワードリセットページ URL"
 
 
 
 
 
 
 
 
886
 
887
- #: classes/class.bSettings.php:93 classes/class.swpm-settings.php:74
888
- msgid "Edit Profile Page URL"
889
- msgstr "プロフィールの編集ページ URL"
 
 
 
 
 
 
 
 
 
 
 
890
 
891
- #: classes/class.bSettings.php:89 classes/class.swpm-settings.php:72
892
- msgid "Join Us Page URL"
893
- msgstr "会員登録の案内ページ URL"
 
 
 
894
 
895
- #: classes/class.bSettings.php:85 classes/class.swpm-settings.php:70
896
- msgid "Registration Page URL"
897
- msgstr "会員ページ URL"
 
 
 
 
898
 
899
- #: classes/class.bSettings.php:81 classes/class.swpm-settings.php:68
900
- msgid "Login Page URL"
901
- msgstr "ログインページ URL"
 
 
 
902
 
903
- #: classes/class.bSettings.php:79 classes/class.swpm-settings.php:67
904
- msgid "Pages Settings"
905
- msgstr " ページ設定 "
906
 
907
- #: classes/class.bSettings.php:73 classes/class.swpm-settings.php:59
908
- msgid "Select how long you want to keep \"pending\" account."
909
- msgstr "保留中のアカウントの期間を選択。"
 
 
 
 
910
 
911
- #: classes/class.bSettings.php:68 classes/class.swpm-settings.php:56
912
- msgid "Auto Delete Pending Account"
913
- msgstr "自動で保留中アカウントの削除"
914
 
915
- #: classes/class.bSettings.php:67 classes/class.swpm-settings.php:55
916
- msgid "Allow users to delete their accounts."
917
- msgstr "会員によるアカウント削除を許可"
918
 
919
- #: classes/class.bSettings.php:63 classes/class.swpm-settings.php:53
920
- msgid "Allow Account Deletion"
921
- msgstr "アカウント削除の許可"
922
 
923
- #: classes/class.bSettings.php:62 classes/class.swpm-settings.php:52
924
- msgid "Select the default account status for newly registered users. If you want to manually approve the members then you can set the status to \"Pending\"."
925
- msgstr "会員登録したユーザーのデフォルトステータスを選択。新規登録の許可を管理者が手動で行う場合は「保留中」を選びます。"
926
 
927
- #: classes/class.bSettings.php:57 classes/class.swpm-settings.php:49
928
- msgid "Default Account Status"
929
- msgstr "デフォルトアカウントステータス"
930
 
931
- #: classes/class.bSettings.php:55 classes/class.swpm-settings.php:47
932
- msgid "WordPress shows an admin toolbar to the logged in users of the site. Check this box if you want to hide that admin toolbar in the fronend of your site."
933
- msgstr "ログインした会員に WordPress の admin ツールバーが表示されます。Web サイトにツールバーを表示したくない場合はチェックしてください。"
934
 
935
- #: classes/class.bSettings.php:52 classes/class.swpm-settings.php:46
936
- msgid "Hide Adminbar"
937
- msgstr "管理バーを表示"
938
 
939
- #: classes/class.bSettings.php:51 classes/class.swpm-settings.php:45
940
- msgid "Enables or disables \"more\" tag protection in the posts and pages. Anything after the More tag is protected. Anything before the more tag is teaser content."
941
- msgstr "投稿やページの「More タグ」による限定公開を有効化・無効化する。More タグ以降のコンテンツが限定公開されます。"
942
 
943
- #: classes/class.bSettings.php:48 classes/class.swpm-settings.php:44
944
- msgid "Enable More Tag Protection"
945
- msgstr "More タグ以下のコンテンツを限定公開"
946
 
947
- #: classes/class.bSettings.php:47 classes/class.swpm-settings.php:43
948
- msgid "Assign free membership level ID"
949
- msgstr "無料会員のレベル ID を指定"
950
 
951
- #: classes/class.bSettings.php:44 classes/class.swpm-settings.php:42
952
- msgid "Free Membership Level ID"
953
- msgstr "無料会員レベルの ID"
954
 
955
- #: classes/class.bSettings.php:43 classes/class.swpm-settings.php:41
956
- msgid "Enable/disable registration for free membership level. When you enable this option, make sure to specify a free membership level ID in the field below."
957
- msgstr ""
958
- "無料会員レベルの有効化 / 無効化。この機能を利用するときは、無料会員レベルの ID\n"
959
- " を入力してください。"
960
 
961
- #: classes/class.bSettings.php:40 classes/class.swpm-settings.php:40
962
- msgid "Enable Free Membership"
963
- msgstr "無料会員を有効にします"
964
 
965
- #: classes/class.bSettings.php:38 classes/class.swpm-settings.php:21
966
- #: classes/class.swpm-settings.php:39
967
- msgid "General Settings"
968
- msgstr "一般設定"
969
 
970
- #: classes/class.bSettings.php:36 classes/class.swpm-settings.php:38
971
- msgid "Plugin Documentation"
972
- msgstr "プラグインのドキュメント"
973
 
974
- #: classes/class.bMembershipLevels.php:19
975
- #: classes/class.swpm-membership-levels.php:22
976
- msgid "Access Valid For/Until"
977
- msgstr "アクセス有効期限"
978
 
979
- #: classes/class.bMembershipLevels.php:18
980
- #: classes/class.swpm-membership-levels.php:21
981
- msgid "Role"
982
- msgstr "権限グループ"
983
 
984
- #: classes/class.bMembershipLevel.php:56
985
- #: classes/class.swpm-membership-level.php:57
986
- msgid "Updated Successfully."
987
- msgstr "更新されました。"
988
 
989
- #: classes/class.bMembershipLevel.php:37
990
- #: classes/class.swpm-membership-level.php:38
991
- msgid "Membership Level Creation Successful."
992
- msgstr "会員レベルを作成しました。"
993
 
994
- #: classes/class.bMembers.php:107 classes/class.swpm-members.php:112
995
- msgid "No Member found."
996
- msgstr "会員が見つかりませんでした。"
997
 
998
- #: classes/class.bMembers.php:23 classes/class.swpm-members.php:25
999
- msgid "Account State"
1000
- msgstr "アカウントの状態"
1001
 
1002
- #: classes/class.bMembers.php:22 classes/class.swpm-members.php:24
1003
- #: views/admin_member_form_common_part.php:11
1004
- msgid "Access Starts"
1005
- msgstr "アクセス開始日"
1006
 
1007
- #: classes/class.bMembers.php:20 classes/class.swpm-members.php:22
1008
- #: views/add.php:10 views/edit.php:8
1009
- msgid "Email"
1010
- msgstr "メール"
1011
 
1012
- #: classes/class.bMembers.php:17 classes/class.swpm-members.php:19
1013
- #: views/add.php:6 views/edit.php:4
1014
- msgid "User Name"
1015
- msgstr "ユーザー名"
1016
 
1017
- #: classes/class.bMembers.php:8 classes/class.simple-wp-membership.php:464
1018
- #: classes/class.swpm-members.php:10 views/admin_members_menu.php:2
1019
- msgid "Members"
1020
- msgstr "メンバー"
1021
 
1022
- #: classes/class.bMembers.php:7 classes/class.swpm-members.php:9
1023
- msgid "Member"
1024
- msgstr "メンバー"
1025
 
1026
- #: classes/class.bMemberUtils.php:22 classes/class.bMemberUtils.php:30
1027
- #: classes/class.swpm-member-utils.php:22
1028
- #: classes/class.swpm-member-utils.php:30
1029
- #: classes/class.swpm-member-utils.php:38
1030
- #: classes/class.swpm-member-utils.php:48
1031
- msgid "User is not logged in."
1032
- msgstr "ログインしていません。"
1033
 
1034
- #: classes/class.bLevelForm.php:55 classes/class.swpm-level-form.php:55
1035
- msgid "Access duration must be > 0."
1036
- msgstr "有効期限の数値を1以上に設定してください。"
1037
 
1038
- #: classes/class.bLevelForm.php:47 classes/class.swpm-level-form.php:47
1039
- msgid "Date format is not valid."
1040
- msgstr "日付の形式が有効ではありません。"
 
 
 
 
1041
 
1042
- #: classes/class.bFrontRegistration.php:200
1043
- #: classes/class.swpm-front-registration.php:224
1044
- msgid "New password has been sent to your email address."
1045
- msgstr "新しいパスワードがメールアドレスに送信されました。"
1046
 
1047
- #: classes/class.bFrontRegistration.php:178
1048
- #: classes/class.bFrontRegistration.php:201
1049
- #: classes/class.swpm-front-registration.php:201
1050
- #: classes/class.swpm-front-registration.php:225
1051
- msgid "Email Address: "
1052
- msgstr "メールアドレス: "
1053
 
1054
- #: classes/class.bFrontRegistration.php:177
1055
- msgid "No user not found with that email address."
1056
- msgstr "このメールアドレスで登録されているユーザーが見つかりません。"
 
1057
 
1058
- #: classes/class.bFrontRegistration.php:166
1059
- #: classes/class.swpm-front-registration.php:189
1060
- msgid "Email address not valid."
1061
- msgstr "メールアドレスが有効ではありません。"
1062
 
1063
- #: classes/class.bFrontRegistration.php:106
1064
- #: classes/class.swpm-front-registration.php:123
1065
- msgid "Membership Level Couldn't be found."
1066
- msgstr "会員レベルが見つかりませんでした。"
1067
 
1068
- #: classes/class.bFrontRegistration.php:72
1069
- #: classes/class.bFrontRegistration.php:156
1070
- #: classes/class.swpm-front-registration.php:92
1071
- #: classes/class.swpm-front-registration.php:179
1072
- msgid "Please correct the following"
1073
- msgstr "下記の内容を修正してください"
1074
 
1075
- #: classes/class.bFrontRegistration.php:61 classes/class.bSettings.php:392
1076
- #: classes/class.swpm-front-registration.php:80
1077
- #: classes/class.swpm-settings.php:377 views/login.php:21
1078
- msgid "Login"
1079
- msgstr "ログイン"
 
1080
 
1081
- #: classes/class.bFrontRegistration.php:61 classes/class.bSettings.php:392
1082
- #: classes/class.swpm-front-registration.php:80
1083
- #: classes/class.swpm-settings.php:377
1084
- msgid "Please"
1085
- msgstr "お願い"
1086
 
1087
- #: classes/class.bFrontRegistration.php:61
1088
- #: classes/class.swpm-front-registration.php:80
1089
- msgid "Registration Successful. "
1090
- msgstr "登録が完了しました。"
1091
 
1092
- #: classes/class.bForm.php:219 classes/class.swpm-form.php:209
1093
- msgid "Invalid membership level"
1094
- msgstr "会員レベルが無効です。"
 
 
1095
 
1096
- #: classes/class.bForm.php:212 classes/class.swpm-form.php:202
1097
- msgid "Account state field is invalid"
1098
- msgstr "アカウントの状態の項目が無効です。"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1099
 
1100
- #: classes/class.bForm.php:201 classes/class.swpm-form.php:191
1101
- msgid "Gender field is invalid"
1102
- msgstr "性別の項目が無効です。"
 
1103
 
1104
- #: classes/class.bForm.php:191 classes/class.swpm-form.php:181
1105
- msgid "Access starts field is invalid"
1106
- msgstr "アクセス開始の項目が無効です。"
1107
 
1108
- #: classes/class.bForm.php:180 classes/class.swpm-form.php:170
1109
- msgid "Member since field is invalid"
1110
- msgstr "会員登録日の項目が無効です。"
1111
 
1112
- #: classes/class.bForm.php:113 classes/class.swpm-form.php:113
1113
- msgid "Email is already used."
1114
- msgstr "メールアドレスがすでに登録済みです。"
1115
 
1116
- #: classes/class.bForm.php:97 classes/class.swpm-form.php:97
1117
- msgid "Email is invalid"
1118
- msgstr "メールアドレスは無効です"
1119
 
1120
- #: classes/class.bForm.php:93 classes/class.swpm-form.php:93
1121
- msgid "Email is required"
1122
- msgstr "メールアドレスは必須です"
1123
 
1124
- #: classes/class.bForm.php:82 classes/class.swpm-form.php:82
1125
- msgid "Password mismatch"
1126
- msgstr "パスワードが一致していません"
1127
 
1128
- #: classes/class.bForm.php:75 classes/class.swpm-form.php:75
1129
- msgid "Password is required"
1130
- msgstr "パスワードは入力必須です"
1131
 
1132
- #: classes/class.bForm.php:52 classes/class.swpm-form.php:52
1133
- msgid "User name already exists."
1134
- msgstr "ユーザー名がすでに登録済みです。"
1135
 
1136
- #: classes/class.bForm.php:44 classes/class.swpm-form.php:44
1137
- msgid "User name contains invalid character"
1138
- msgstr "ユーザー名に無効の文字が含まれています。"
1139
 
1140
- #: classes/class.bForm.php:40 classes/class.swpm-form.php:40
1141
- msgid "User name is required"
1142
- msgstr "ユーザー名は必須です"
1143
 
1144
- #: classes/class.bForm.php:31 classes/class.swpm-form.php:31
1145
- msgid "Wordpress account exists with given email. But given user name doesn't match."
1146
- msgstr "同一のメールアドレスの WordPress アカウントが存在します。しかし、指定されたユーザー名は一致しません。"
1147
 
1148
- #: classes/class.bForm.php:26 classes/class.swpm-form.php:26
1149
- msgid "Wordpress account exists with given user name. But given email doesn't match."
1150
- msgstr "同一のユーザー名の WordPress アカウントが存在します。しかし、指定されたメールアドレスは一致しません。"
1151
 
1152
- #: classes/class.bCategoryList.php:78
1153
- msgid "Updated! "
1154
- msgstr "更新しました。"
 
 
 
1155
 
1156
- #: classes/class.bCategoryList.php:37 classes/class.swpm-category-list.php:36
1157
- msgid "Count"
1158
- msgstr "数"
1159
 
1160
- #: classes/class.bCategoryList.php:36 classes/class.swpm-category-list.php:35
1161
- msgid "Description"
1162
- msgstr "説明"
1163
 
1164
- #: classes/class.bCategoryList.php:35 classes/class.swpm-category-list.php:34
1165
- msgid "Name"
1166
- msgstr "名称"
1167
 
1168
- #: classes/class.bCategoryList.php:34 classes/class.bMembers.php:16
1169
- #: classes/class.bMembershipLevels.php:16
1170
- #: classes/class.swpm-category-list.php:33 classes/class.swpm-members.php:18
1171
- #: classes/class.swpm-membership-levels.php:19
1172
- msgid "ID"
1173
- msgstr "ID"
1174
 
1175
- #: classes/class.bCategoryList.php:20 classes/class.bMembershipLevels.php:9
1176
- #: classes/class.simple-wp-membership.php:465
1177
- #: classes/class.swpm-category-list.php:20
1178
- #: classes/class.swpm-membership-levels.php:11
1179
- msgid "Membership Levels"
1180
- msgstr "会員レベル"
1181
 
1182
- #: classes/class.bAuth.php:224
1183
- msgid "Sorry! Something went wrong"
1184
- msgstr "間違いがあります。"
1185
 
1186
- #: classes/class.bAuth.php:216 classes/class.swpm-auth.php:219
1187
- msgid "Invalid User Name"
1188
- msgstr "無効なユーザー名です。"
1189
 
1190
- #: classes/class.bAuth.php:208 classes/class.swpm-auth.php:210
1191
- msgid "Session Expired."
1192
- msgstr "セッションが期限切れです。"
1193
 
1194
- #: classes/class.bAuth.php:158 classes/class.swpm-auth.php:160
1195
- msgid "Logged Out Successfully."
1196
- msgstr "ログアウトしました。"
1197
 
1198
- #: classes/class.bAuth.php:116 classes/class.swpm-auth.php:114
1199
- msgid "You are logged in as:"
1200
- msgstr "ログイン名:"
1201
 
1202
- #: classes/class.bAuth.php:86 classes/class.bAuth.php:108
1203
- #: classes/class.swpm-auth.php:88 classes/class.swpm-auth.php:106
1204
- msgid "Account has expired."
1205
- msgstr "アカウントが期限切れです。"
1206
 
1207
- #: classes/class.bAuth.php:82 classes/class.swpm-auth.php:85
1208
- msgid "Account is pending."
1209
- msgstr "アカウントが保留中です。"
1210
 
1211
- #: classes/class.bAuth.php:78 classes/class.swpm-auth.php:82
1212
- msgid "Account is inactive."
1213
- msgstr "アカウントが無効です。"
1214
 
1215
- #: classes/class.bAuth.php:53 classes/class.swpm-auth.php:57
1216
- msgid "Password Empty or Invalid."
1217
- msgstr "パスワードが未記入または無効です。"
1218
 
1219
- #: classes/class.bAuth.php:46 classes/class.swpm-auth.php:50
1220
- msgid "User Not Found."
1221
- msgstr "ユーザーが見つかりません。"
1222
 
1223
- #: classes/class.bAjax.php:33 classes/class.swpm-ajax.php:33
1224
- msgid "Available"
1225
- msgstr "有効"
1226
 
1227
- #: classes/class.bAjax.php:21 classes/class.bAjax.php:32
1228
- #: classes/class.swpm-ajax.php:21 classes/class.swpm-ajax.php:32
1229
- msgid "Aready taken"
1230
- msgstr "すでに取得済みです。"
1231
 
1232
- #: classes/class.bAjax.php:14 classes/class.swpm-ajax.php:14
1233
- msgid "Invalid Email Address"
1234
- msgstr "メールアドレスが無効です。"
1235
-
1236
- #: classes/class.bAdminRegistration.php:53
1237
- #: classes/class.bAdminRegistration.php:89
1238
- #: classes/class.bMembershipLevel.php:42 classes/class.bMembershipLevel.php:61
1239
- #: classes/class.swpm-admin-registration.php:59
1240
- #: classes/class.swpm-admin-registration.php:100
1241
- #: classes/class.swpm-membership-level.php:43
1242
- #: classes/class.swpm-membership-level.php:62
1243
- msgid "Please correct the following:"
1244
- msgstr "以下の内容を修正してください。"
1245
 
1246
- #: classes/class.bAdminRegistration.php:48
1247
- msgid "Registration Successful."
1248
- msgstr "登録が完了しました。"
1249
 
1250
- #: classes/class.bAccessControl.php:88 classes/class.bAccessControl.php:106
1251
- #: classes/class.swpm-access-control.php:88
1252
- #: classes/class.swpm-access-control.php:106
1253
- msgid "You need to login to view the rest of the content. "
1254
- msgstr "このコンテンツを閲覧するにはログインが必要です。"
1255
 
1256
- #: classes/class.bAccessControl.php:84 classes/class.swpm-access-control.php:84
1257
- msgid " The rest of the content is not permitted for your membership level."
1258
- msgstr "これからの先のコンテンツはあなたの会員レベルでは閲覧できません。"
 
 
 
1259
 
1260
- #: classes/class.bAccessControl.php:46 classes/class.bAccessControl.php:66
1261
- #: classes/class.swpm-access-control.php:46
1262
- #: classes/class.swpm-access-control.php:66
1263
- msgid "This content is not permitted for your membership level."
1264
- msgstr "このコンテンツはあなたの会員レベルでは閲覧できません。"
1265
 
1266
- #: classes/class.bAccessControl.php:34 classes/class.bAccessControl.php:60
1267
- #: classes/class.swpm-access-control.php:34
1268
- #: classes/class.swpm-access-control.php:60
1269
- msgid "Your account has expired. Please renew your account to gain access to this content."
1270
- msgstr "アカウントが期限切れです。アカウントの更新が必要です。"
1271
 
1272
- #: classes/class.bAccessControl.php:21 classes/class.bAccessControl.php:28
1273
- #: classes/class.bAccessControl.php:55 classes/class.swpm-access-control.php:21
1274
- #: classes/class.swpm-access-control.php:28
1275
- #: classes/class.swpm-access-control.php:55
1276
- msgid "You need to login to view this content. "
1277
- msgstr "このコンテンツを閲覧するにはログインが必要です。"
1278
-
1279
- #: classes/admin-includes/class.swpm-payments-list-table.php:53
1280
- #: classes/class.bCategoryList.php:19 classes/class.bMembers.php:21
1281
- #: classes/class.bMembershipLevels.php:8 classes/class.bMembershipLevels.php:17
1282
- #: classes/class.swpm-category-list.php:19 classes/class.swpm-members.php:23
1283
- #: classes/class.swpm-membership-levels.php:10
1284
- #: classes/class.swpm-membership-levels.php:20 views/add.php:30
1285
- #: views/admin_member_form_common_part.php:2 views/edit.php:52
1286
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:36
1287
- #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:217
1288
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:37
1289
- #: views/payments/payment-gateway/admin_paypal_subscription_button.php:310
1290
- msgid "Membership Level"
1291
- msgstr "会員レベル"
1292
 
1293
- #: classes/admin-includes/class.swpm-payments-list-table.php:52
1294
- msgid "Amount"
1295
- msgstr "金額"
1296
 
1297
- #: classes/admin-includes/class.swpm-payments-list-table.php:51
1298
- msgid "Transaction ID"
1299
- msgstr "トランザクション ID"
1300
 
1301
- #: classes/admin-includes/class.swpm-payments-list-table.php:50
1302
- msgid "Date"
1303
- msgstr "日付"
1304
 
1305
- #: classes/admin-includes/class.swpm-payments-list-table.php:49
1306
- #: classes/class.bMembers.php:19 classes/class.swpm-members.php:21
1307
- #: views/add.php:26 views/admin_member_form_common_part.php:19
1308
- #: views/edit.php:24
1309
- msgid "Last Name"
1310
- msgstr "姓"
1311
 
1312
- #: classes/admin-includes/class.swpm-payments-list-table.php:48
1313
- #: classes/class.bMembers.php:18 classes/class.swpm-members.php:20
1314
- #: views/add.php:22 views/admin_member_form_common_part.php:15
1315
- #: views/edit.php:20
1316
- msgid "First Name"
1317
- msgstr "名"
1318
 
1319
- #: classes/admin-includes/class.swpm-payments-list-table.php:47
1320
- #: views/forgot_password.php:5
1321
- msgid "Email Address"
1322
- msgstr "メールアドレス"
1323
 
1324
- #: classes/admin-includes/class.swpm-payments-list-table.php:46
1325
- msgid "Row ID"
1326
- msgstr "列 ID"
1327
 
1328
- #: classes/admin-includes/class.swpm-payment-buttons-list-table.php:106
1329
- #: views/admin_members_list.php:15 views/admin_payments_page.php:37
1330
- #: views/payments/admin_all_payment_transactions.php:33
1331
- msgid "The selected entry was deleted!"
1332
- msgstr "選択したエントリーは削除されました。"
1333
 
1334
- #: classes/admin-includes/class.swpm-payment-buttons-list-table.php:80
1335
- #: classes/admin-includes/class.swpm-payments-list-table.php:68
1336
- #: classes/class.bMembers.php:36 classes/class.bMembershipLevels.php:30
1337
- #: classes/class.swpm-members.php:38
1338
- #: classes/class.swpm-membership-levels.php:35
1339
- msgid "Delete"
1340
- msgstr "削除"
1341
 
1342
- #: classes/admin-includes/class.swpm-payment-buttons-list-table.php:66
1343
- msgid "Button Shortcode"
1344
- msgstr "ショートコードボタン"
1345
 
1346
- #: classes/admin-includes/class.swpm-payment-buttons-list-table.php:65
1347
- msgid "Membership Level ID"
1348
- msgstr "会員レベル ID"
1349
 
1350
- #: classes/admin-includes/class.swpm-payment-buttons-list-table.php:64
1351
- msgid "Payment Button Title"
1352
- msgstr "支払ボタンタイトル"
1353
 
1354
- #: classes/admin-includes/class.swpm-payment-buttons-list-table.php:63
1355
- msgid "Payment Button ID"
1356
- msgstr "支払ボタン ID"
1357
 
1358
- #: classes/class.swpm-front-registration.php:140
1359
- msgid "You need to confirm your email address. Please check your email and follow instructions to complete your registration."
1360
- msgstr "アカウントのご登録ありがとうございます。ご登録いただいたメールアドレスに、ご本人確認の案内をお送りいたしました。メールに記載のURLにアクセスいただき、登録を完了させてください。"
1361
 
1362
- #: views/login.php:11
1363
- msgid "Username or Email"
1364
- msgstr "ユーザー名またはメールアドレス"
1365
 
1366
- #: views/login.php:33
1367
- msgid "Forgot Password?"
1368
- msgstr "パスワードをお忘れですか?"
1369
 
1370
- #: swpm-form-builder/classes/class.swpm-fb-fieldmeta.php:423
1371
- msgid "Type password here"
1372
- msgstr "ここにパスワードを入力してください"
1373
 
1374
- #: swpm-form-builder/classes/class.swpm-fb-fieldmeta.php:427
1375
- msgid "Retype password here"
1376
- msgstr "ここにパスワードを再入力してください"
1377
 
1378
- #: classes/class.swpm-front-registration.php:397
1379
- msgid "Success! Your account has been activated successfully."
1380
- msgstr "ご本人確認が完了しました。有効なアカウントです。"
1381
 
1382
- #: classes/class.swpm-front-registration.php:383
1383
- msgid "Activation code mismatch. Cannot activate this account. Please contact the site admin."
1384
- msgstr "アクティベーションコードが一致しないため、このアカウントを有効にすることはできません。 サイト管理者に連絡してください。"
1385
 
1386
- #: classes/class.swpm-front-registration.php:443
1387
- msgid "Activation email has been sent. Please check your email and activate your account."
1388
- msgstr "アクティベーションメールが送信されました。 メールを確認してアカウントを有効にしてください。"
1389
 
1390
- #: classes/class.swpm-utils-misc.php:168
1391
- msgid "You will be automatically redirected in a few seconds. If not, please %s."
1392
- msgstr "数秒後に自動でリダイレクトされます。リダイレクトされない場合は %s してください。"
1393
 
1394
- #: classes/class.swpm-utils-misc.php:169
1395
- msgid "click here"
1396
- msgstr "こちらをクリック"
1397
 
1398
- #: classes/class.swpm-auth.php:146
1399
- msgid "You need to activate your account. If you didn't receive an email then %s to resend the activation email."
1400
- msgstr "アカウントを有効にする必要があります。 アクティベーションメールが見当たらない場合は %s して再送します。"
2
  # This file is distributed under the same license as the Plugins - Simple Membership - Development (trunk) package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Plugins - Simple Membership - Development (trunk)\n"
6
+ "POT-Creation-Date: 2019-05-26 13:48+0600\n"
7
+ "PO-Revision-Date: 2020-01-30 00:23-0600\n"
8
+ "Last-Translator: \n"
9
+ "Language-Team: \n"
10
+ "Language: ja_JP\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
13
  "Content-Transfer-Encoding: 8bit\n"
14
  "Plural-Forms: nplurals=1; plural=0;\n"
15
+ "X-Generator: Poedit 2.2.4\n"
 
 
 
 
 
16
 
17
+ #: classes/class.simple-wp-membership.php:180
18
+ msgid "The admin of this site does not allow users to access the wp dashboard."
19
+ msgstr ""
20
+ "このサイトの管理者はユーザーのWPダッシュボードへのアクセスを許可していませ"
21
+ "ん。"
22
 
23
+ #: classes/class.simple-wp-membership.php:181
24
+ msgid "Go back to the home page by "
25
+ msgstr "ホームページに戻るには "
26
 
27
+ #: classes/class.simple-wp-membership.php:181
28
+ msgid "clicking here"
29
+ msgstr "こちらをクリック"
 
 
 
30
 
31
+ #: classes/class.simple-wp-membership.php:242
32
+ msgid ""
33
+ "Error! This site has the force WP user login feature enabled in the "
34
+ "settings. We could not find a WP user record for the given username: "
35
+ msgstr ""
36
+ "エラー!このサイトはWPユーザーでログインさせるように設定しています。ご指定の"
37
+ "ユーザー名はWPユーザーの記録では見当たりませんでした: "
38
 
39
+ #: classes/class.simple-wp-membership.php:243
40
+ msgid ""
41
+ "This error is triggered when a member account doesn't have a corresponding "
42
+ "WP user account. So the plugin fails to log the user into the WP User system."
43
+ msgstr ""
44
+ "メンバーアカウントがWPユーザーアカウントに連携していない場合にこのエラーが出"
45
+ "ます。このプラグインは、ユーザーをWPユーザーシステムへログインできませんでし"
46
+ "た。"
47
 
48
+ #: classes/class.simple-wp-membership.php:244
49
+ msgid ""
50
+ "Contact the site admin and request them to check your username in the WP "
51
+ "Users menu to see what happened with the WP user entry of your account."
52
+ msgstr ""
53
+ "サイト管理者に、WPユーザーメニューであなたのユーザー名を検索してもらい、WP"
54
+ "ユーザーリストでのあなたのアカウント状態を確認してもらってください。"
55
 
56
+ #: classes/class.simple-wp-membership.php:245
57
+ msgid ""
58
+ "The site admin can disable the Force WP User Synchronization feature in the "
59
+ "settings to disable this feature and this error will go away."
60
+ msgstr ""
61
+ "サイト管理者は設定画面で、WPユーザー強制同期を無効にできます。そうすることで"
62
+ "このエラーが出なくなります。"
63
 
64
+ #: classes/class.simple-wp-membership.php:246
65
+ msgid "You can use the back button of your browser to go back to the site."
66
+ msgstr "あなたのブラウザーの「戻る」ボタンでサイトに戻ることができます。"
 
67
 
68
+ #: classes/class.simple-wp-membership.php:407
69
+ msgid "You are not logged in."
70
+ msgstr "ログインしていません。"
 
71
 
72
+ #: classes/class.simple-wp-membership.php:458
73
+ msgid ""
74
+ "You have the sandbox payment mode enabled in plugin settings. Make sure to "
75
+ "turn off the sandbox mode when you want to do live transactions."
76
+ msgstr ""
77
+ "プラグイン設定でサンドボックス支払いモードが有効になっています。本番の決済を"
78
+ "する時には、サンドボックスモードを必ず無効にしてください。"
79
 
80
+ #: classes/class.simple-wp-membership.php:473
81
+ msgid "Simple WP Membership Protection"
82
+ msgstr "Simple WP Membership 保護"
 
83
 
84
+ #: classes/class.simple-wp-membership.php:485
85
+ msgid "Simple Membership Protection options"
86
+ msgstr "Simple WP Membership 保護設定"
 
87
 
88
+ #: classes/class.simple-wp-membership.php:503
89
+ msgid "Do you want to protect this content?"
90
+ msgstr "このコンテンツを保護しますか ?"
 
91
 
92
+ #: classes/class.simple-wp-membership.php:504
93
+ msgid "No, Do not protect this content."
94
+ msgstr "いいえ、このコンテンツを保護しません。"
 
95
 
96
+ #: classes/class.simple-wp-membership.php:505
97
+ msgid "Yes, Protect this content."
98
+ msgstr "はい、このコンテンツを保護します。"
 
99
 
100
+ #: classes/class.simple-wp-membership.php:508
101
+ msgid "Select the membership level that can access this content:"
102
+ msgstr "このコンテンツを閲覧できる会員レベルを選択してください:"
 
103
 
104
+ #: classes/class.simple-wp-membership.php:646
105
+ #: classes/class.simple-wp-membership.php:650
106
+ msgid "Validating, please wait"
107
+ msgstr "認証しています、お待ちください"
 
 
108
 
109
+ #: classes/class.simple-wp-membership.php:653
110
+ msgid "Invalid email address"
111
+ msgstr "メールアドレスが無効です"
 
 
 
112
 
113
+ #: classes/class.simple-wp-membership.php:656
114
+ msgid "This field is required"
115
+ msgstr "このフィールドは必須です"
 
 
 
116
 
117
+ msgid "Password must contain at least:"
118
+ msgstr "パスワードに最低限使用する文字列:"
 
 
 
 
119
 
120
+ msgid "- a digit"
121
+ msgstr "- 半角数字1文字"
 
 
 
 
122
 
123
+ msgid "- an uppercase letter"
124
+ msgstr "- 半角大文字1文字"
 
 
125
 
126
+ msgid "- a lowercase letter"
127
+ msgstr "- 半角小文字1文字"
 
 
 
 
128
 
129
+ #: classes/class.simple-wp-membership.php:659 classes/class.swpm-auth.php:296
130
+ msgid "Invalid Username"
131
+ msgstr "無効なユーザー名"
 
132
 
133
+ #: classes/class.simple-wp-membership.php:659
134
+ msgid "Usernames can only contain: letters, numbers and .-_*@"
135
+ msgstr "ユーザー名に使用できる文字:半角アルファベット、半角数字と .-_*@"
136
 
137
+ #: classes/class.simple-wp-membership.php:662
138
+ msgid "Minimum "
139
+ msgstr "最低限 "
140
 
141
+ #: classes/class.simple-wp-membership.php:663
142
+ msgid " characters required"
143
+ msgstr " 必要な文字数"
144
 
145
+ #: classes/class.simple-wp-membership.php:666
146
+ msgid "Apostrophe character is not allowed"
147
+ msgstr "アポストロフィー(‘)は使えません"
148
 
149
+ #: classes/class.simple-wp-membership.php:697
150
+ msgid "WP Membership"
151
+ msgstr "WP Membership"
152
 
153
+ #: classes/class.simple-wp-membership.php:698 classes/class.swpm-members.php:11
154
+ #: classes/class.swpm-members.php:581
155
+ msgid "Members"
156
+ msgstr "会員"
157
 
158
+ #: classes/class.simple-wp-membership.php:699
159
+ #: classes/class.swpm-category-list.php:20
160
+ #: classes/class.swpm-membership-levels.php:12
161
+ #: classes/class.swpm-membership-levels.php:265
162
+ #: classes/class.swpm-post-list.php:21
163
+ msgid "Membership Levels"
164
+ msgstr "会員レベル"
165
 
166
+ #: classes/class.simple-wp-membership.php:700
167
+ msgid "Settings"
168
+ msgstr "設定"
169
 
170
+ #: classes/class.simple-wp-membership.php:701
171
+ msgid "Payments"
172
+ msgstr "支払い"
173
 
174
+ #: classes/class.simple-wp-membership.php:702
175
+ msgid "Add-ons"
176
+ msgstr "アドオン"
177
 
178
+ #: classes/class.swpm-access-control.php:47
179
+ #: classes/class.swpm-access-control.php:120
180
+ msgid "You need to login to view this content. "
181
+ msgstr "このコンテンツを閲覧するにはログインが必要です。 "
182
 
183
+ #: classes/class.swpm-access-control.php:56
184
+ #: classes/class.swpm-access-control.php:128
185
+ #: classes/class.swpm-access-control.php:212
186
+ msgid "Your account has expired. "
187
+ msgstr "アカウントが期限切れです。 "
188
 
189
+ #: classes/class.swpm-access-control.php:66
190
+ #: classes/class.swpm-access-control.php:138
191
+ msgid "This content can only be viewed by members who joined on or before "
192
+ msgstr "このコンテンツを閲覧できるのは、入会日がこの日以前の会員です "
193
 
194
+ #: classes/class.swpm-access-control.php:79
195
+ #: classes/class.swpm-access-control.php:148
196
+ msgid "This content is not permitted for your membership level."
197
+ msgstr "このコンテンツはあなたの会員レベルでは閲覧できません。"
198
 
199
+ #: classes/class.swpm-access-control.php:204
200
+ msgid "You need to login to view the rest of the content. "
201
+ msgstr "このコンテンツの続きを閲覧するにはログインが必要です。 "
202
 
203
+ #: classes/class.swpm-access-control.php:217
204
+ msgid " The rest of the content is not permitted for your membership level."
205
+ msgstr " ここからの先のコンテンツはあなたの会員レベルでは閲覧できません。"
206
 
207
+ #: classes/class.swpm-admin-registration.php:25
208
+ msgid "Error! Nonce verification failed for user registration from admin end."
209
+ msgstr "エラー!管理画面からのユーザー登録の際、認証に失敗しました。"
210
 
211
+ #: classes/class.swpm-admin-registration.php:71
212
+ msgid "Member record added successfully."
213
+ msgstr "会員情報の追加が完了しました。"
214
 
215
+ #: classes/class.swpm-admin-registration.php:76
216
+ #: classes/class.swpm-admin-registration.php:124
217
+ #: classes/class.swpm-admin-registration.php:151
218
+ #: classes/class.swpm-membership-level.php:73
219
+ #: classes/class.swpm-membership-level.php:105
220
+ msgid "Please correct the following:"
221
+ msgstr "以下の内容を修正してください:"
222
 
223
+ #: classes/class.swpm-admin-registration.php:87
224
+ msgid "Error! Nonce verification failed for user edit from admin end."
225
+ msgstr "エラー!管理画面からのユーザー編集の際、認証に失敗しました。"
226
 
227
+ #: classes/class.swpm-admin-registration.php:139
228
+ msgid "Your current password"
229
+ msgstr "現在のパスワード"
230
 
231
+ #: classes/class.swpm-ajax.php:14
232
+ msgid "Invalid Email Address"
233
+ msgstr "無効なメールアドレス"
 
234
 
235
+ #: classes/class.swpm-ajax.php:21 classes/class.swpm-ajax.php:36
236
+ msgid "Already taken"
237
+ msgstr "すでに使われています"
 
238
 
239
+ #: classes/class.swpm-ajax.php:30
240
+ msgid "Name contains invalid character"
241
+ msgstr "名前に無効な文字が含まれています"
 
242
 
243
+ #: classes/class.swpm-ajax.php:37
244
+ msgid "Available"
245
+ msgstr "利用できます"
246
 
247
+ #: classes/class.swpm-auth.php:57
248
+ msgid ""
249
+ "Warning! Simple Membership plugin cannot process this login request to "
250
+ "prevent you from getting logged out of WP Admin accidentally."
251
+ msgstr ""
252
+ "警告!WP管理画面からあなたが間違ってログアウトするのを防ぐため、Simple "
253
+ "Membershipプラグインはこのログインリクエストを処理することができません。"
254
 
255
+ #: classes/class.swpm-auth.php:58
256
+ msgid "Click here"
257
+ msgstr "こちらをクリック"
 
258
 
259
+ #: classes/class.swpm-auth.php:58
260
+ msgid " to see the profile you are currently logged into in this browser."
261
+ msgstr " あなたが今このブラウザでログインしているプロフィールが確認できます。"
 
262
 
263
+ #: classes/class.swpm-auth.php:59
264
+ msgid ""
265
+ "You are logged into the site as an ADMIN user in this browser. First, logout "
266
+ "from WP Admin then you will be able to log in as a normal member."
267
+ msgstr ""
268
+ "あなたは今このブラウザーに管理者としてログインしています。まず、WP管理画面か"
269
+ "らログアウトすれば、普通のメンバーとしてログインできるようになります。"
270
 
271
+ #: classes/class.swpm-auth.php:60
272
+ msgid ""
273
+ "Alternatively, you can use a different browser (where you are not logged-in "
274
+ "as ADMIN) to test the membership login."
275
+ msgstr ""
276
+ "別の方法として、違うブラウザー(管理者としてログインしていない)からメンバー"
277
+ "ログインをテストすることもできます。"
278
 
279
+ #: classes/class.swpm-auth.php:61
280
+ msgid ""
281
+ "Your normal visitors or members will never see this message. This message is "
282
+ "ONLY for ADMIN user."
283
+ msgstr ""
284
+ "普通の訪問者やメンバーがこのメッセージを見ることはありません。このメッセージ"
285
+ "は管理者にのみ表示されます。"
286
 
287
+ #: classes/class.swpm-auth.php:68
288
+ msgid "Captcha validation failed on login form."
289
+ msgstr "ログインフォームでキャプチャ認証に失敗しました。"
290
 
291
+ #: classes/class.swpm-auth.php:93
292
+ msgid "User Not Found."
293
+ msgstr "ユーザーが見つかりません。"
294
 
295
+ #: classes/class.swpm-auth.php:100
296
+ msgid "Password Empty or Invalid."
297
+ msgstr "パスワードが未記入または無効です。"
298
 
299
+ #: classes/class.swpm-auth.php:133
300
+ msgid "Account is inactive."
301
+ msgstr "アカウントが無効です。"
302
 
303
+ #: classes/class.swpm-auth.php:136 classes/class.swpm-auth.php:162
304
+ msgid "Account has expired."
305
+ msgstr "アカウントが期限切れです。"
306
 
307
+ #: classes/class.swpm-auth.php:139
308
+ msgid "Account is pending."
309
+ msgstr "アカウントが保留中です。"
310
 
311
+ #: classes/class.swpm-auth.php:146
312
+ #, php-format
313
+ msgid ""
314
+ "You need to activate your account. If you didn't receive an email then %s to "
315
+ "resend the activation email."
316
+ msgstr ""
317
+ "アカウントを有効にする必要があります。 アクティベーションメールが見当たらない"
318
+ "場合は %s すれば再送されます。"
319
 
320
+ #: classes/class.swpm-auth.php:146
321
+ #: classes/class.swpm-front-registration.php:376
322
+ #: classes/class.swpm-front-registration.php:426
323
+ #: classes/class.swpm-utils-misc.php:169
324
+ msgid "click here"
325
+ msgstr "こちらをクリック"
326
 
327
+ #: classes/class.swpm-auth.php:170
328
+ msgid "You are logged in as:"
329
+ msgstr "ログイン中のアカウント:"
330
 
331
+ #: classes/class.swpm-auth.php:234
332
+ msgid "Logged Out Successfully."
333
+ msgstr "ログアウトしました。"
334
 
335
+ #: classes/class.swpm-auth.php:287
336
+ msgid "Session Expired."
337
+ msgstr "セッションが期限切れです。"
338
 
339
+ #: classes/class.swpm-auth.php:304
340
+ msgid "Please login again."
341
+ msgstr "再度ログインしてください。"
342
 
343
+ #: classes/class.swpm-category-list.php:19 classes/class.swpm-members.php:24
344
+ #: classes/class.swpm-membership-levels.php:11
345
+ #: classes/class.swpm-membership-levels.php:21
346
+ #: classes/class.swpm-post-list.php:20
347
+ #: classes/admin-includes/class.swpm-payments-list-table.php:85
348
+ #: views/add.php:40 views/admin_member_form_common_part.php:2 views/edit.php:75
349
+ #: views/payments/payment-gateway/admin_braintree_buy_now_button.php:50
350
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:34
351
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:229
352
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:49
353
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:35
354
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:317
355
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:47
356
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:273
357
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:99
358
+ msgid "Membership Level"
359
+ msgstr "会員レベル"
360
 
361
+ #: classes/class.swpm-category-list.php:33
362
+ msgid "Category ID"
363
+ msgstr "カテゴリーID"
364
 
365
+ #: classes/class.swpm-category-list.php:34
366
+ msgid "Category Name"
367
+ msgstr "カテゴリー名"
368
 
369
+ #: classes/class.swpm-category-list.php:35
370
+ msgid "Category Type (Taxonomy)"
371
+ msgstr "カテゴリータイプ(タクソノミー)"
372
 
373
+ #: classes/class.swpm-category-list.php:36
374
+ msgid "Description"
375
+ msgstr "説明"
376
 
377
+ #: classes/class.swpm-category-list.php:37
378
+ msgid "Count"
379
+ msgstr ""
380
 
381
+ #: classes/class.swpm-category-list.php:92
382
+ msgid "Category protection updated!"
383
+ msgstr "カテゴリー保護を更新しました!"
384
 
385
+ #: classes/class.swpm-category-list.php:130
386
+ msgid "No category found."
387
+ msgstr "カテゴリーが見つかりません。"
388
 
389
+ #: classes/class.swpm-comment-form-related.php:15
390
+ msgid "Please login to comment."
391
+ msgstr "コメントを書き込むにはログインしてください。"
392
 
393
+ #: classes/class.swpm-comment-form-related.php:40
394
+ msgid "Please Login to Comment."
395
+ msgstr "コメントを書き込むにはログインしてください。"
396
 
397
+ #: classes/class.swpm-comment-form-related.php:79
398
+ msgid "Comments not allowed by a non-member."
399
+ msgstr "会員以外はコメント書き込みできません。"
400
 
401
+ #: classes/class.swpm-form.php:30
402
+ msgid ""
403
+ "Wordpress account exists with given username. But given email doesn't match."
404
+ msgstr ""
405
+ "同一のユーザー名の WordPress アカウントが存在しますが、入力されたメールアドレ"
406
+ "スは一致しません。"
407
 
408
+ #: classes/class.swpm-form.php:31
409
+ msgid ""
410
+ " Use a different username to complete the registration. If you want to use "
411
+ "that username then you must enter the correct email address associated with "
412
+ "the existing WP user to connect with that account."
413
+ msgstr ""
414
+ " 別のユーザー名で登録を完了してください。もし、このユーザー名をお使いにな離た"
415
+ "い場合は、既存のWPユーザーアカウントと紐づいている正しいメールアドレスを入力"
416
+ "してください。"
417
 
418
+ #: classes/class.swpm-form.php:37
419
+ msgid ""
420
+ "Wordpress account exists with given email. But given username doesn't match."
421
+ msgstr ""
422
+ "同一のメールアドレスの WordPress アカウントが存在しますが、入力されたユーザー"
423
+ "名は一致しません。"
424
 
425
+ #: classes/class.swpm-form.php:38
426
+ msgid ""
427
+ " Use a different email address to complete the registration. If you want to "
428
+ "use that email then you must enter the correct username associated with the "
429
+ "existing WP user to connect with that account."
430
+ msgstr ""
431
+ " 別のメールアドレスで登録を完了してください。もし、このメールアドレスをお使い"
432
+ "になりたい場合は、既存のWPユーザーアカウントと紐づいている正しいユーザー名を"
433
+ "入力してください。"
434
 
435
+ #: classes/class.swpm-form.php:48
436
+ msgid "Username is required"
437
+ msgstr "ユーザー名は必須です"
438
 
439
+ #: classes/class.swpm-form.php:52
440
+ msgid "Username contains invalid character"
441
+ msgstr "ユーザー名に無効な文字が含まれています"
442
 
443
+ #: classes/class.swpm-form.php:60
444
+ msgid "Username already exists."
445
+ msgstr "ユーザー名がすでに登録済みです。"
446
 
447
+ #: classes/class.swpm-form.php:83
448
+ msgid "Password is required"
449
+ msgstr "パスワードは入力必須です"
450
 
451
+ #: classes/class.swpm-form.php:90
452
+ msgid "Password mismatch"
453
+ msgstr "パスワードが一致していません"
454
 
455
+ #: classes/class.swpm-form.php:101
456
+ msgid "Email is required"
457
+ msgstr "メールアドレスは必須です"
458
 
459
+ #: classes/class.swpm-form.php:105
460
+ msgid "Email is invalid"
461
+ msgstr "メールアドレスが無効です"
 
 
462
 
463
+ #: classes/class.swpm-form.php:121
464
+ msgid "Email is already used."
465
+ msgstr "メールアドレスがすでに登録済みです。"
466
 
467
+ #: classes/class.swpm-form.php:179
468
+ msgid "Member since field is invalid"
469
+ msgstr "会員登録日のフィールドが無効です"
470
 
471
+ #: classes/class.swpm-form.php:190
472
+ msgid "Access starts field is invalid"
473
+ msgstr "アクセス開始日のフィールドが無効です"
474
 
475
+ #: classes/class.swpm-form.php:200
476
+ msgid "Gender field is invalid"
477
+ msgstr "性別のフィールドが無効です"
478
+
479
+ #: classes/class.swpm-form.php:211
480
+ msgid "Account state field is invalid"
481
+ msgstr "アカウントの状態の項目が無効です"
482
+
483
+ #: classes/class.swpm-form.php:218
484
+ msgid "Invalid membership level"
485
+ msgstr "会員レベルが無効です"
486
+
487
+ #: classes/class.swpm-front-registration.php:33
488
+ msgid ""
489
+ "Error! Invalid Request. Could not find a match for the given security code "
490
+ "and the user ID."
491
+ msgstr ""
492
+ "エラー!無効なリクエスト。入力されたセキュリティーコードとユーザーIDが一致し"
493
+ "ません。"
494
+
495
+ #: classes/class.swpm-front-registration.php:45
496
+ #: classes/class.swpm-utils-misc.php:274 views/login.php:36
497
+ msgid "Join Us"
498
+ msgstr "入会のご案内"
499
+
500
+ #: classes/class.swpm-front-registration.php:47
501
+ msgid ""
502
+ "Free membership is disabled on this site. Please make a payment from the "
503
+ msgstr ""
504
+ "このサイトでは無料会員は受け付けておりません。。有料会員のお支払い手続きは "
505
+
506
+ #: classes/class.swpm-front-registration.php:49
507
+ msgid " page to pay for a premium membership."
508
+ msgstr " ページからお願いします。"
509
+
510
+ #: classes/class.swpm-front-registration.php:51
511
+ msgid ""
512
+ "You will receive a unique link via email after the payment. You will be able "
513
+ "to use that link to complete the premium membership registration."
514
+ msgstr ""
515
+ "お支払い完了後、メールで専用リンクが配信されます。そのリンクから有料会員登録"
516
+ "を完了していただけます。"
517
+
518
+ #: classes/class.swpm-front-registration.php:79
519
+ msgid "Security check: captcha validation failed."
520
+ msgstr "セキュリティチェック: キャプチャ認証に失敗しました。"
521
+
522
+ #: classes/class.swpm-front-registration.php:89
523
+ msgid "You must accept the terms and conditions."
524
+ msgstr "ご利用条件への同意が必要です。"
525
+
526
+ #: classes/class.swpm-front-registration.php:100
527
+ msgid "You must agree to the privacy policy."
528
+ msgstr "プライバシーポリシーへの同意が必要です。"
529
+
530
+ #: classes/class.swpm-front-registration.php:140
531
+ msgid ""
532
+ "You need to confirm your email address. Please check your email and follow "
533
+ "instructions to complete your registration."
534
+ msgstr ""
535
+ "メールアドレスの確認が必要です。メールボックスにお届けしたメールの手順に従っ"
536
+ "て登録を完了してください。"
537
+
538
+ #: classes/class.swpm-front-registration.php:145
539
+ msgid "Registration Successful. "
540
+ msgstr "登録が完了しました。 "
541
+
542
+ #: classes/class.swpm-front-registration.php:145
543
+ #: classes/class.swpm-utils-misc.php:273 classes/class.swpm-utils-misc.php:285
544
+ msgid "Please"
545
+ msgstr "どうぞ"
546
+
547
+ #: classes/class.swpm-front-registration.php:145
548
+ #: classes/class.swpm-utils-misc.php:273 views/login.php:30
549
+ msgid "Login"
550
+ msgstr "ログインしてください"
551
+
552
+ #: classes/class.swpm-front-registration.php:159
553
+ msgid "Please correct the following"
554
+ msgstr "下記の内容を修正してください"
555
+
556
+ #: classes/class.swpm-front-registration.php:207
557
+ msgid "Membership Level Couldn't be found."
558
+ msgstr "会員レベルが見つかりませんでした。"
559
+
560
+ #: classes/class.swpm-front-registration.php:258
561
+ msgid "Error! Nonce verification failed for front end profile edit."
562
+ msgstr "エラー!ユーザー画面からのプロフィール編集の際、認証に失敗しました。"
563
+
564
+ #: classes/class.swpm-front-registration.php:266
565
+ msgid "Profile updated successfully."
566
+ msgstr "プロフィールが更新されました。"
567
+
568
+ #: classes/class.swpm-front-registration.php:275
569
+ msgid ""
570
+ "Profile updated successfully. You will need to re-login since you changed "
571
+ "your password."
572
+ msgstr ""
573
+ "プロフィールが更新されました。パスワードが変更されたので、再度ログインが必要"
574
+ "です。"
575
+
576
+ #: classes/class.swpm-front-registration.php:289
577
+ msgid "Please correct the following."
578
+ msgstr "下記の内容を修正してください。"
579
+
580
+ #: classes/class.swpm-front-registration.php:301
581
+ msgid "Captcha validation failed."
582
+ msgstr "キャプチャ認証に失敗しました。"
583
+
584
+ #: classes/class.swpm-front-registration.php:309
585
+ msgid "Email address not valid."
586
+ msgstr "メールアドレスが有効ではありません。"
587
+
588
+ #: classes/class.swpm-front-registration.php:320
589
+ msgid "No user found with that email address."
590
+ msgstr "そのメールアドレスで登録されたユーザーが見つかりません。"
591
+
592
+ #: classes/class.swpm-front-registration.php:321
593
+ #: classes/class.swpm-front-registration.php:350
594
+ msgid "Email Address: "
595
+ msgstr "メールアドレス: "
596
+
597
+ #: classes/class.swpm-front-registration.php:349
598
+ msgid "New password has been sent to your email address."
599
+ msgstr "新しいパスワードがあなたのメールアドレスに送信されました。"
600
+
601
+ #: classes/class.swpm-front-registration.php:371
602
+ msgid "Can't find member account."
603
+ msgstr "会員アカウントが見つかりません。"
604
+
605
+ #: classes/class.swpm-front-registration.php:376
606
+ #: classes/class.swpm-front-registration.php:426
607
+ msgid "Account already active. "
608
+ msgstr "アカウントは既に有効化されています。 "
609
+
610
+ #: classes/class.swpm-front-registration.php:376
611
+ #: classes/class.swpm-front-registration.php:426
612
+ msgid " to login."
613
+ msgstr " ログインするために。"
614
+
615
+ #: classes/class.swpm-front-registration.php:383
616
+ msgid ""
617
+ "Activation code mismatch. Cannot activate this account. Please contact the "
618
+ "site admin."
619
+ msgstr ""
620
+ "有効化コードが一致しないため、このアカウントを有効化できません。 サイト管理者"
621
+ "に連絡してください。"
622
+
623
+ #: classes/class.swpm-front-registration.php:397
624
+ msgid "Success! Your account has been activated successfully."
625
+ msgstr "成功!あなたのアカウントが有効になりました。"
626
+
627
+ #: classes/class.swpm-front-registration.php:421
628
+ msgid "Cannot find member account."
629
+ msgstr "会員アカウントが見つかりません。"
630
+
631
+ #: classes/class.swpm-front-registration.php:443
632
+ msgid ""
633
+ "Activation email has been sent. Please check your email and activate your "
634
+ "account."
635
+ msgstr ""
636
+ "有効化するためのメールが送信されました。 メールを確認してアカウントを有効にし"
637
+ "てください。"
638
+
639
+ #: classes/class.swpm-init-time-tasks.php:118
640
+ msgid "Sorry, Nonce verification failed."
641
+ msgstr "残念ながら、認証に失敗しました。"
642
+
643
+ #: classes/class.swpm-init-time-tasks.php:125
644
+ msgid "Sorry, Password didn't match."
645
+ msgstr "残念ながら、パスワードが一致しませんでした。"
646
+
647
+ #: classes/class.swpm-level-form.php:50
648
+ msgid "Date format is not valid."
649
+ msgstr "日付の形式が有効ではありません。"
650
+
651
+ #: classes/class.swpm-level-form.php:58
652
+ msgid "Access duration must be > 0."
653
+ msgstr "有効期限の数値を1以上に設定してください。"
654
+
655
+ #: classes/class.swpm-members.php:10
656
+ msgid "Member"
657
+ msgstr "会員"
658
+
659
+ #: classes/class.swpm-members.php:19
660
+ #: classes/class.swpm-membership-levels.php:20
661
+ msgid "ID"
662
+ msgstr "ID"
663
+
664
+ #: classes/class.swpm-members.php:20 views/add.php:16 views/admin_add.php:11
665
+ #: views/admin_edit.php:19 views/edit.php:23
666
+ #: includes/swpm_mda_show_profile.php:27
667
+ msgid "Username"
668
+ msgstr "ユーザー名"
669
+
670
+ #: classes/class.swpm-members.php:21
671
+ #: classes/admin-includes/class.swpm-payments-list-table.php:78
672
+ #: views/add.php:32 views/admin_member_form_common_part.php:15
673
+ #: views/edit.php:39 includes/swpm_mda_show_profile.php:28
674
+ msgid "First Name"
675
+ msgstr "名"
676
+
677
+ #: classes/class.swpm-members.php:22
678
+ #: classes/admin-includes/class.swpm-payments-list-table.php:79
679
+ #: views/add.php:36 views/admin_member_form_common_part.php:19
680
+ #: views/edit.php:43 includes/swpm_mda_show_profile.php:29
681
+ msgid "Last Name"
682
+ msgstr "姓"
683
+
684
+ #: classes/class.swpm-members.php:23 views/add.php:20 views/edit.php:27
685
+ #: includes/swpm_mda_show_profile.php:35
686
+ msgid "Email"
687
+ msgstr "メール"
688
+
689
+ #: classes/class.swpm-members.php:25 views/admin_member_form_common_part.php:11
690
+ msgid "Access Starts"
691
+ msgstr "アクセス開始日"
692
+
693
+ #: classes/class.swpm-members.php:26 includes/swpm_mda_show_profile.php:31
694
+ msgid "Account State"
695
+ msgstr "アカウントの状態"
696
+
697
+ #: classes/class.swpm-members.php:27
698
+ msgid "Last Login Date"
699
+ msgstr "前回のログイン日"
700
+
701
+ #: classes/class.swpm-members.php:46
702
+ #: classes/class.swpm-membership-levels.php:36
703
+ #: classes/admin-includes/class.swpm-payment-buttons-list-table.php:94
704
+ #: classes/admin-includes/class.swpm-payments-list-table.php:102
705
+ msgid "Delete"
706
+ msgstr "削除"
707
+
708
+ #: classes/class.swpm-members.php:47
709
+ msgid "Set Status to Active"
710
+ msgstr "ステータスを有効に設定"
711
+
712
+ #: classes/class.swpm-members.php:48
713
+ msgid "Set Status to Active and Notify"
714
+ msgstr "ステータスを有効に設定し通知"
715
+
716
+ #: classes/class.swpm-members.php:49
717
+ msgid "Set Status to Inactive"
718
+ msgstr "ステータスを無効に設定"
719
+
720
+ #: classes/class.swpm-members.php:50
721
+ msgid "Set Status to Pending"
722
+ msgstr "ステータスを保留に設定"
723
+
724
+ #: classes/class.swpm-members.php:51
725
+ msgid "Set Status to Expired"
726
+ msgstr "ステータスを期限切れに設定"
727
+
728
+ #: classes/class.swpm-members.php:72
729
+ msgid "incomplete"
730
+ msgstr "不完全"
731
+
732
+ #: classes/class.swpm-members.php:191
733
+ msgid "No member found."
734
+ msgstr "会員が見つかりません。"
735
+
736
+ #: classes/class.swpm-members.php:337
737
+ msgid "Error! Nonce verification failed for user delete from admin end."
738
+ msgstr "エラー!管理画面からユーザー削除する際、認証に失敗しました。"
739
+
740
+ #: classes/class.swpm-members.php:406 classes/class.swpm-members.php:436
741
+ msgid "Error! Please select a membership level first."
742
+ msgstr "エラー!まず会員レベルを選択してください。"
743
+
744
+ #: classes/class.swpm-members.php:423
745
+ msgid "Membership level change operation completed successfully."
746
+ msgstr "会員レベルの変更が完了しました。"
747
+
748
+ #: classes/class.swpm-members.php:453
749
+ msgid "Access starts date change operation successfully completed."
750
+ msgstr "アクセス開始日の変更が完了しました。"
751
+
752
+ #: classes/class.swpm-members.php:462
753
+ msgid "Bulk Update Membership Level of Members"
754
+ msgstr "複数会員の会員レベルを一括更新"
755
+
756
+ #: classes/class.swpm-members.php:465
757
+ msgid ""
758
+ "You can manually change the membership level of any member by editing the "
759
+ "record from the members menu. "
760
+ msgstr ""
761
+ "個別会員の会員レベルを手動で変更するには、会員メニューから該当する情報を編集"
762
+ "します。 "
763
+
764
+ #: classes/class.swpm-members.php:466
765
+ msgid ""
766
+ "You can use the following option to bulk update the membership level of "
767
+ "users who belong to the level you select below."
768
+ msgstr ""
769
+ "次のオプションを使って、以下で選択した会員レベルに属するすべての会員を一括更"
770
+ "新できます。"
771
+
772
+ #: classes/class.swpm-members.php:472 classes/class.swpm-members.php:520
773
+ msgid "Membership Level: "
774
+ msgstr "会員レベル: "
775
+
776
+ #: classes/class.swpm-members.php:476
777
+ msgid "Select Current Level"
778
+ msgstr "現在のレベルを選択"
779
+
780
+ #: classes/class.swpm-members.php:479
781
+ msgid ""
782
+ "Select the current membership level (the membership level of all members who "
783
+ "are in this level will be updated)."
784
+ msgstr ""
785
+ "現在の会員レベルを選択(更新したい会員レベルに属するすべての会員が一括で更新"
786
+ "されます)。"
787
+
788
+ #: classes/class.swpm-members.php:485
789
+ msgid "Level to Change to: "
790
+ msgstr "変更後のレベル: "
791
+
792
+ #: classes/class.swpm-members.php:489
793
+ msgid "Select Target Level"
794
+ msgstr "ターゲットレベルを選択"
795
+
796
+ #: classes/class.swpm-members.php:492
797
+ msgid "Select the new membership level."
798
+ msgstr "新しい会員レベルを選択。"
799
+
800
+ #: classes/class.swpm-members.php:498
801
+ msgid "Bulk Change Membership Level"
802
+ msgstr "会員レベルを一括変更"
803
+
804
+ #: classes/class.swpm-members.php:508
805
+ msgid "Bulk Update Access Starts Date of Members"
806
+ msgstr "会員のアクセス開始日を一括更新"
807
+
808
+ #: classes/class.swpm-members.php:512
809
+ msgid ""
810
+ "The access starts date of a member is set to the day the user registers. "
811
+ "This date value is used to calculate how long the member can access your "
812
+ "content that are protected with a duration type protection in the membership "
813
+ "level. "
814
+ msgstr ""
815
+ "会員のアクセス開始日は、ユーザー登録された日に設定されています。有効期限付き"
816
+ "のコンテンツを閲覧できるレベルの会員が、あとどのぐらいの期間アクセスできるか"
817
+ "を計算するために、この日付が使われます。 "
818
+
819
+ #: classes/class.swpm-members.php:513
820
+ msgid ""
821
+ "You can manually set a specific access starts date value of all members who "
822
+ "belong to a particular level using the following option."
823
+ msgstr ""
824
+ "次のオプションを使って、ある会員レベルに属するすべての会員のアクセス開始日を"
825
+ "手動で設定できます。"
826
+
827
+ #: classes/class.swpm-members.php:523
828
+ msgid "Select Level"
829
+ msgstr "レベルを選択"
830
+
831
+ #: classes/class.swpm-members.php:526
832
+ msgid ""
833
+ "Select the Membership level (the access start date of all members who are in "
834
+ "this level will be updated)."
835
+ msgstr ""
836
+ "会員レベルを選択(このレベルに属するすべての会員のアクセス開始日が更新されま"
837
+ "す)。"
838
+
839
+ #: classes/class.swpm-members.php:535
840
+ msgid "Specify the access starts date value."
841
+ msgstr "アクセス開始日の値を指定。"
842
+
843
+ #: classes/class.swpm-members.php:541
844
+ msgid "Bulk Change Access Starts Date"
845
+ msgstr "アクセス開始日を一括変更"
846
+
847
+ #: classes/class.swpm-members.php:576
848
+ msgid "Simple WP Membership::Members"
849
+ msgstr "Simple WP Membership::会員"
850
+
851
+ #: classes/class.swpm-members.php:577
852
+ #: classes/class.swpm-membership-levels.php:226 views/admin_members_list.php:44
853
+ msgid "Add New"
854
+ msgstr "新規追加"
855
+
856
+ #: classes/class.swpm-members.php:582 views/admin_add.php:6
857
+ msgid "Add Member"
858
+ msgstr "会員の追加"
859
+
860
+ #: classes/class.swpm-members.php:583
861
+ msgid "Bulk Operation"
862
+ msgstr "一括操作"
863
+
864
+ #: classes/class.swpm-membership-level.php:52
865
+ msgid ""
866
+ "Error! Nonce verification failed for membership level creation from admin "
867
+ "end."
868
+ msgstr "エラー!管理画面からの会員レベル作成の際、認証に失敗しました。"
869
+
870
+ #: classes/class.swpm-membership-level.php:68
871
+ msgid "Membership Level Creation Successful."
872
+ msgstr "会員レベルを作成しました。"
873
+
874
+ #: classes/class.swpm-membership-level.php:84
875
+ msgid ""
876
+ "Error! Nonce verification failed for membership level edit from admin end."
877
+ msgstr "エラー!管理画面からの会員レベル編集の際、認証に失敗しました。"
878
+
879
+ #: classes/class.swpm-membership-level.php:100
880
+ msgid "Membership Level Updated Successfully."
881
+ msgstr "会員レベルの更新が完了しました。"
882
+
883
+ #: classes/class.swpm-membership-levels.php:22
884
+ msgid "Role"
885
+ msgstr "権限グループ"
886
+
887
+ #: classes/class.swpm-membership-levels.php:23
888
+ msgid "Access Valid For/Until"
889
+ msgstr "アクセス有効期限"
890
+
891
+ #: classes/class.swpm-membership-levels.php:133
892
+ msgid "No membership levels found."
893
+ msgstr "会員レベルが見つかりません。"
894
+
895
+ #: classes/class.swpm-membership-levels.php:197
896
+ msgid ""
897
+ "Error! Nonce verification failed for membership level delete from admin end."
898
+ msgstr "エラー!管理画面から会員レベル削除の際、認証に失敗しました。"
899
+
900
+ #: classes/class.swpm-membership-levels.php:216 views/admin_members_list.php:31
901
+ #: views/payments/admin_all_payment_transactions.php:16 views/template-1.php:53
902
+ #: views/template-2.php:54
903
+ msgid "Search"
904
+ msgstr "検索"
905
+
906
+ #: classes/class.swpm-membership-levels.php:261
907
+ msgid "Simple WP Membership::Membership Levels"
908
+ msgstr "Simple WP Membership::会員レベル"
909
+
910
+ #: classes/class.swpm-membership-levels.php:266
911
+ msgid "Add Level"
912
+ msgstr "レベルの追加"
913
+
914
+ #: classes/class.swpm-membership-levels.php:267
915
+ msgid "Manage Content Protection"
916
+ msgstr "コンテンツ保護を管理"
917
+
918
+ #: classes/class.swpm-membership-levels.php:268
919
+ msgid "Category Protection"
920
+ msgstr "カテゴリー保護"
921
+
922
+ #: classes/class.swpm-membership-levels.php:269
923
+ msgid "Post and Page Protection"
924
+ msgstr "投稿や固定ページの保護"
925
+
926
+ #: classes/class.swpm-post-list.php:43 classes/class.swpm-post-list.php:52
927
+ #: classes/class.swpm-post-list.php:62
928
+ #: classes/admin-includes/class.swpm-payments-list-table.php:81
929
+ msgid "Date"
930
+ msgstr "日付"
931
+
932
+ #: classes/class.swpm-post-list.php:44 classes/class.swpm-post-list.php:53
933
+ #: classes/class.swpm-post-list.php:63
934
+ msgid "Title"
935
+ msgstr "タイトル"
936
+
937
+ #: classes/class.swpm-post-list.php:45 classes/class.swpm-post-list.php:54
938
+ #: classes/class.swpm-post-list.php:64
939
+ msgid "Author"
940
+ msgstr "作者"
941
+
942
+ #: classes/class.swpm-post-list.php:46 classes/class.swpm-post-list.php:56
943
+ #: classes/class.swpm-post-list.php:66
944
+ msgid "Status"
945
+ msgstr "ステータス"
946
+
947
+ #: classes/class.swpm-post-list.php:55
948
+ msgid "Categories"
949
+ msgstr "カテゴリー"
950
+
951
+ #: classes/class.swpm-post-list.php:65
952
+ msgid "Type"
953
+ msgstr "タイプ"
954
+
955
+ #: classes/class.swpm-post-list.php:125
956
+ msgid "Protection settings updated!"
957
+ msgstr "保護設定を更新しました!"
958
+
959
+ #: classes/class.swpm-post-list.php:230
960
+ msgid "No items found."
961
+ msgstr "アイテムが見つかりません。"
962
+
963
+ #: classes/class.swpm-protection.php:22
964
+ msgid ""
965
+ "The category or parent category of this post is protected. You can change "
966
+ "the category protection settings from the "
967
+ msgstr ""
968
+ "この投稿のカテゴリー、または親カテゴリーは保護されています。カテゴリー保護の"
969
+ "設定変更は "
970
+
971
+ #: classes/class.swpm-protection.php:23
972
+ msgid "category protection menu"
973
+ msgstr "カテゴリー保護メニュー"
974
+
975
+ #: classes/class.swpm-settings.php:26 classes/class.swpm-settings.php:54
976
+ msgid "General Settings"
977
+ msgstr "一般設定"
978
+
979
+ #: classes/class.swpm-settings.php:27
980
+ msgid "Payment Settings"
981
+ msgstr "支払い設定"
982
+
983
+ #: classes/class.swpm-settings.php:28
984
+ msgid "Email Settings"
985
+ msgstr "メール設定"
986
+
987
+ #: classes/class.swpm-settings.php:29
988
+ msgid "Tools"
989
+ msgstr "ツール"
990
+
991
+ #: classes/class.swpm-settings.php:30 classes/class.swpm-settings.php:187
992
+ msgid "Advanced Settings"
993
+ msgstr "詳細設定"
994
+
995
+ #: classes/class.swpm-settings.php:31
996
+ msgid "Addons Settings"
997
+ msgstr "アドオンの設定"
998
+
999
+ #: classes/class.swpm-settings.php:53
1000
+ msgid "Plugin Documentation"
1001
+ msgstr "プラグインのマニュアル"
1002
+
1003
+ #: classes/class.swpm-settings.php:55
1004
+ msgid "Enable Free Membership"
1005
+ msgstr "無料会員を有効にします"
1006
+
1007
+ #: classes/class.swpm-settings.php:56
1008
+ msgid ""
1009
+ "Enable/disable registration for free membership level. When you enable this "
1010
+ "option, make sure to specify a free membership level ID in the field below."
1011
+ msgstr ""
1012
+ "無料会員レベル登録の有効化 / 無効化。この機能を有効にする場合は、無料会員レベ"
1013
+ "ルIDを以下の欄に必ず指定してください。"
1014
+
1015
+ #: classes/class.swpm-settings.php:57
1016
+ msgid "Free Membership Level ID"
1017
+ msgstr "無料会員レベル ID"
1018
+
1019
+ #: classes/class.swpm-settings.php:58
1020
+ msgid "Assign free membership level ID"
1021
+ msgstr "無料会員のレベルIDを指定"
1022
+
1023
+ #: classes/class.swpm-settings.php:59
1024
+ msgid "Enable More Tag Protection"
1025
+ msgstr "More タグ以下のコンテンツを保護"
1026
+
1027
+ #: classes/class.swpm-settings.php:60
1028
+ msgid ""
1029
+ "Enables or disables \"more\" tag protection in the posts and pages. Anything "
1030
+ "after the More tag is protected. Anything before the more tag is teaser "
1031
+ "content."
1032
+ msgstr ""
1033
+ "投稿や固定ページの「More タグ」保護を有効化/無効化。More タグ以降のコンテン"
1034
+ "ツはすべて保護されます。Moreタグ以前のコンテンツはティーザーです。"
1035
+
1036
+ #: classes/class.swpm-settings.php:61
1037
+ msgid "Hide Adminbar"
1038
+ msgstr "管理バーを非表示"
1039
+
1040
+ #: classes/class.swpm-settings.php:62
1041
+ msgid ""
1042
+ "WordPress shows an admin toolbar to the logged in users of the site. Check "
1043
+ "this if you want to hide that admin toolbar in the frontend of your site."
1044
+ msgstr ""
1045
+ "WordPressはサイトにログインしたユーザーにadminツールバーを表示します。Webサイ"
1046
+ "トにツールバーを表示したくない場合はチェックしてください。"
1047
+
1048
+ #: classes/class.swpm-settings.php:63
1049
+ msgid "Show Adminbar to Admin"
1050
+ msgstr "Adminツールバーを管理者に表示"
1051
+
1052
+ #: classes/class.swpm-settings.php:64
1053
+ msgid ""
1054
+ "Use this option if you want to show the admin toolbar to admin users only. "
1055
+ "The admin toolbar will be hidden for all other users."
1056
+ msgstr ""
1057
+ "管理者のみにadminツールバーを表示したい場合にこのオプションを使います。それ以"
1058
+ "外のユーザーにはadminツールバーは表示されません。"
1059
+
1060
+ #: classes/class.swpm-settings.php:65
1061
+ msgid "Disable Access to WP Dashboard"
1062
+ msgstr "WPダッシュボードへのアクセスを無効化"
1063
+
1064
+ #: classes/class.swpm-settings.php:66
1065
+ msgid ""
1066
+ "WordPress allows a standard wp user to be able to go to the wp-admin URL and "
1067
+ "access his profile from the wp dashbaord. Using this option will prevent any "
1068
+ "non admin users from going to the wp dashboard."
1069
+ msgstr ""
1070
+ "WordPressは、標準のWPユーザーがwp-admin URLからWPダッシュボードの自分のプロ"
1071
+ "フィールにアクセスすることを許可します。このオプションを使うことで管理者以外"
1072
+ "がWPダッシュボードへアクセスできないようにします。"
1073
+
1074
+ #: classes/class.swpm-settings.php:68 classes/class.swpm-settings.php:242
1075
+ msgid "Default Account Status"
1076
+ msgstr "デフォルトアカウントステータス"
1077
+
1078
+ #: classes/class.swpm-settings.php:71
1079
+ msgid ""
1080
+ "Select the default account status for newly registered users. If you want to "
1081
+ "manually approve the members then you can set the status to \"Pending\"."
1082
+ msgstr ""
1083
+ "新しく会員登録したユーザーのデフォルトステータスを選択。管理者が手動で会員を"
1084
+ "承認する場合は「保留中」を選びます。"
1085
+
1086
+ #: classes/class.swpm-settings.php:73
1087
+ msgid "Members Must be Logged in to Comment"
1088
+ msgstr "コメントするには会員のログインが必要です"
1089
+
1090
+ #: classes/class.swpm-settings.php:74
1091
+ msgid ""
1092
+ "Enable this option if you only want the members of the site to be able to "
1093
+ "post a comment."
1094
+ msgstr ""
1095
+ "このサイトの会員だけにコメント投稿を許可したい場合は、このオプションを有効に"
1096
+ "します。"
1097
+
1098
+ #: classes/class.swpm-settings.php:83
1099
+ msgid "Pages Settings"
1100
+ msgstr "ページ設定"
1101
+
1102
+ #: classes/class.swpm-settings.php:84
1103
+ msgid "Login Page URL"
1104
+ msgstr "ログインページ URL"
1105
+
1106
+ #: classes/class.swpm-settings.php:86
1107
+ msgid "Registration Page URL"
1108
+ msgstr "登録ページ URL"
1109
+
1110
+ #: classes/class.swpm-settings.php:88
1111
+ msgid "Join Us Page URL"
1112
+ msgstr "会員登録案内ページ URL"
1113
+
1114
+ #: classes/class.swpm-settings.php:90
1115
+ msgid "Edit Profile Page URL"
1116
+ msgstr "プロフィールの編集ページ URL"
1117
+
1118
+ #: classes/class.swpm-settings.php:92
1119
+ msgid "Password Reset Page URL"
1120
+ msgstr "パスワードリセットページ URL"
1121
+
1122
+ #: classes/class.swpm-settings.php:95
1123
+ msgid "Test & Debug Settings"
1124
+ msgstr "テスト & デバッグ設定"
1125
+
1126
+ #: classes/class.swpm-settings.php:97
1127
+ msgid "Check this option to enable debug logging."
1128
+ msgstr "デバッグログを有効にする場合はこのオプションをチェック。"
1129
+
1130
+ #: classes/class.swpm-settings.php:98
1131
+ msgid ""
1132
+ " This can be useful when troubleshooting an issue. Turn it off and reset the "
1133
+ "log files after the troubleshooting is complete."
1134
+ msgstr ""
1135
+ " これは問題をトラブルシューティングする際に便利です。トラブルシューティングが"
1136
+ "完了したらオフにして、ログファイルをリセットしましょう。"
1137
+
1138
+ #: classes/class.swpm-settings.php:100
1139
+ msgid "View general debug log file by clicking "
1140
+ msgstr "一般デバッグログファイルを閲覧するには "
1141
+
1142
+ #: classes/class.swpm-settings.php:100 classes/class.swpm-settings.php:101
1143
+ #: classes/class.swpm-settings.php:102
1144
+ msgid "here"
1145
+ msgstr "ここをクリック"
1146
+
1147
+ #: classes/class.swpm-settings.php:101
1148
+ msgid "View login related debug log file by clicking "
1149
+ msgstr "ログイン関連のデバッグログを閲覧するには "
1150
+
1151
+ #: classes/class.swpm-settings.php:102
1152
+ msgid "Reset debug log files by clicking "
1153
+ msgstr "デバッグログファイルをリセットするには "
1154
+
1155
+ #: classes/class.swpm-settings.php:103
1156
+ msgid "Enable Debug"
1157
+ msgstr "デバッグを有効化"
1158
+
1159
+ #: classes/class.swpm-settings.php:105
1160
+ msgid "Enable Sandbox Testing"
1161
+ msgstr "サンドボックステストを有効化"
1162
+
1163
+ #: classes/class.swpm-settings.php:106
1164
+ msgid "Enable this option if you want to do sandbox payment testing."
1165
+ msgstr ""
1166
+ "サンドボックスで支払いテストをしたい場合は、このオプションを有効にします。"
1167
+
1168
+ #: classes/class.swpm-settings.php:119
1169
+ msgid "Email Settings Overview"
1170
+ msgstr "メール設定概要"
1171
+
1172
+ #: classes/class.swpm-settings.php:120
1173
+ msgid "Email Misc. Settings"
1174
+ msgstr "その他メール設定"
1175
+
1176
+ #: classes/class.swpm-settings.php:122
1177
+ msgid "From Email Address"
1178
+ msgstr "送信元メールアドレス"
1179
+
1180
+ #: classes/class.swpm-settings.php:126
1181
+ msgid "Email Settings (Prompt to Complete Registration )"
1182
+ msgstr "メール設定(登録完了を促す)"
1183
+
1184
+ #: classes/class.swpm-settings.php:127 classes/class.swpm-settings.php:140
1185
+ #: classes/class.swpm-settings.php:158 classes/class.swpm-settings.php:163
1186
+ #: classes/class.swpm-settings.php:168 classes/class.swpm-settings.php:173
1187
+ msgid "Email Subject"
1188
+ msgstr "メール件名"
1189
+
1190
+ #: classes/class.swpm-settings.php:129 classes/class.swpm-settings.php:142
1191
+ #: classes/class.swpm-settings.php:159 classes/class.swpm-settings.php:164
1192
+ #: classes/class.swpm-settings.php:169 classes/class.swpm-settings.php:174
1193
+ msgid "Email Body"
1194
+ msgstr "メール本文"
1195
+
1196
+ #: classes/class.swpm-settings.php:133
1197
+ msgid ""
1198
+ "Enter the email address where you want the admin notification email to be "
1199
+ "sent to."
1200
+ msgstr "管理者通知メールの送信先メールアドレスを入力してください。"
1201
+
1202
+ #: classes/class.swpm-settings.php:134
1203
+ msgid ""
1204
+ " You can put multiple email addresses separated by comma (,) in the above "
1205
+ "field to send the notification to multiple email addresses."
1206
+ msgstr ""
1207
+ " 上のフィールドにカンマ(,)区切りで複数のメールアドレスを記入すると、複数の"
1208
+ "メールアドレスへ通知を配信できます。"
1209
+
1210
+ #: classes/class.swpm-settings.php:136
1211
+ msgid "Enter the subject for the admin notification email."
1212
+ msgstr "管理者通知メールの件名を記入。"
1213
+
1214
+ #: classes/class.swpm-settings.php:137
1215
+ msgid ""
1216
+ "This email will be sent to the admin when a new user completes the "
1217
+ "membership registration. Only works if you have enabled the \"Send "
1218
+ "Notification to Admin\" option above."
1219
+ msgstr ""
1220
+ "このメールは新しいユーザーが会員登録を完了した時に管理者に送られます。上の"
1221
+ "「管理者へ通知を送信」オプションを有効にした場合のみ作動します。"
1222
+
1223
+ #: classes/class.swpm-settings.php:139
1224
+ msgid "Email Settings (Registration Complete)"
1225
+ msgstr "メール設定(登録完了)"
1226
+
1227
+ #: classes/class.swpm-settings.php:144
1228
+ msgid "Send Notification to Admin"
1229
+ msgstr "管理者へ通知を送信"
1230
+
1231
+ #: classes/class.swpm-settings.php:145
1232
+ msgid ""
1233
+ "Enable this option if you want the admin to receive a notification when a "
1234
+ "member registers."
1235
+ msgstr ""
1236
+ "管理者が会員登録の通知を受信したい場合は、このオプションを有効にします。"
1237
+
1238
+ #: classes/class.swpm-settings.php:146
1239
+ msgid "Admin Email Address"
1240
+ msgstr "管理者のメールアドレス"
1241
+
1242
+ #: classes/class.swpm-settings.php:148
1243
+ msgid "Admin Notification Email Subject"
1244
+ msgstr "管理者通知メールの件名"
1245
+
1246
+ #: classes/class.swpm-settings.php:150
1247
+ msgid "Admin Notification Email Body"
1248
+ msgstr "管理者通知メールの本文"
1249
+
1250
+ #: classes/class.swpm-settings.php:153
1251
+ msgid "Send Email to Member When Added via Admin Dashboard"
1252
+ msgstr "管理画面から会員登録した場合、登録された会員宛にメールを送信"
1253
+
1254
+ #: classes/class.swpm-settings.php:157
1255
+ msgid "Email Settings (Password Reset)"
1256
+ msgstr "メール設定(パスワードリセット)"
1257
+
1258
+ #: classes/class.swpm-settings.php:162
1259
+ msgid " Email Settings (Account Upgrade Notification)"
1260
+ msgstr " メール設定(アカウントのアップグレード通知)"
1261
+
1262
+ #: classes/class.swpm-settings.php:167
1263
+ msgid " Email Settings (Bulk Account Activate Notification)"
1264
+ msgstr " メール設定(複数アカウント一括有効化通知)"
1265
+
1266
+ #: classes/class.swpm-settings.php:172
1267
+ msgid " Email Settings (Email Activation)"
1268
+ msgstr " メール設定(メールでの有効化)"
1269
+
1270
+ #: classes/class.swpm-settings.php:189
1271
+ msgid "Enable Expired Account Login"
1272
+ msgstr "有効期限切れのアカウントのログインを有効にする"
1273
+
1274
+ #: classes/class.swpm-settings.php:190
1275
+ msgid ""
1276
+ "When enabled, expired members will be able to log into the system but won't "
1277
+ "be able to view any protected content. This allows them to easily renew "
1278
+ "their account by making another payment."
1279
+ msgstr ""
1280
+ "この機能を有効にした場合、有効期限切れの会員はシステムにログインできますが、"
1281
+ "会員限定コンテンツは閲覧できません。これは会員が支払いをして更新手続きしやす"
1282
+ "いようにするためのものです。"
1283
+
1284
+ #: classes/class.swpm-settings.php:192
1285
+ msgid "Membership Renewal URL"
1286
+ msgstr "会員更新URL"
1287
+
1288
+ #: classes/class.swpm-settings.php:193
1289
+ msgid ""
1290
+ "You can create a renewal page for your site. Read <a href=\"https://simple-"
1291
+ "membership-plugin.com/creating-membership-renewal-button/\" target=\"_blank"
1292
+ "\">this documentation</a> to learn how to create a renewal page."
1293
+ msgstr ""
1294
+ "このサイトで更新ページを作成できます。更新サイト作成方法は<a href=“https://"
1295
+ "simple-membership-plugin.com/creating-membership-renewal-button/“ "
1296
+ "target=“_blank”>this documentation</a> をご覧ください。"
1297
+
1298
+ #: classes/class.swpm-settings.php:195
1299
+ msgid "After Registration Redirect URL"
1300
+ msgstr "登録後のリダイレクト先URL"
1301
+
1302
+ #: classes/class.swpm-settings.php:196
1303
+ msgid ""
1304
+ "You can enter an URL here to redirect the members to this page after they "
1305
+ "submit the registration form. Read <a href=\"https://simple-membership-"
1306
+ "plugin.com/configure-after-registration-redirect-for-members/\" target="
1307
+ "\"_blank\">this documentation</a> to learn how to setup after registration "
1308
+ "redirect."
1309
+ msgstr ""
1310
+ "登録フォームを提出した後でその会員をリダイレクトする先のURLをここに入力できま"
1311
+ "す。登録後のリダイレクトの設定方法につきましては<a href=“https://simple-"
1312
+ "membership-plugin.com/configure-after-registration-redirect-for-members/“ "
1313
+ "target=“_blank”>this documentation</a> をご覧ください。"
1314
+
1315
+ #: classes/class.swpm-settings.php:198
1316
+ msgid "Enable Auto Login After Registration"
1317
+ msgstr "登録後の自動ログインを有効化"
1318
+
1319
+ #: classes/class.swpm-settings.php:199
1320
+ msgid ""
1321
+ "Use this option if you want the members to be automatically logged into your "
1322
+ "site right after they complete the registration. This option will override "
1323
+ "any after registration redirection and instead it will trigger the after "
1324
+ "login redirection. Read <a href=\"https://simple-membership-plugin.com/"
1325
+ "configure-auto-login-after-registration-members/\" target=\"_blank\">this "
1326
+ "documentation</a> to learn more."
1327
+ msgstr ""
1328
+ "新規会員が登録完了した直後にサイトに自動ログインさせるには、このオプションを"
1329
+ "使います。このオプションは他の登録リダイレクトを無効にし、代わりにログイン後"
1330
+ "のリダイレクトを作動させます。詳細は <a href=“https://simple-membership-"
1331
+ "plugin.com/configure-auto-login-after-registration-members/“ target=“_blank”>"
1332
+ "このマニュアル</a>をご覧ください。"
1333
+
1334
+ #: classes/class.swpm-settings.php:201
1335
+ msgid "After Logout Redirect URL"
1336
+ msgstr "ログアウト後のリダイレクトURL"
1337
+
1338
+ #: classes/class.swpm-settings.php:202
1339
+ msgid ""
1340
+ "You can enter an URL here to redirect the members to this page after they "
1341
+ "click the logout link to logout from your site."
1342
+ msgstr ""
1343
+ "「ログアウト」リンクをクリックしてサイトからログアウトした会員をリダイレクト"
1344
+ "したいURLをここに入力できます。"
1345
+
1346
+ #: classes/class.swpm-settings.php:204
1347
+ msgid "Logout Member on Browser Close"
1348
+ msgstr "ブラウザーを閉じた時に会員をログアウトさせる"
1349
+
1350
+ #: classes/class.swpm-settings.php:205
1351
+ msgid ""
1352
+ "Enable this option if you want the member to be logged out of the account "
1353
+ "when he closes the browser."
1354
+ msgstr ""
1355
+ "会員がブラウザーを閉じた時にログアウトさせたい場合は、このオプションを有効に"
1356
+ "します。"
1357
+
1358
+ #: classes/class.swpm-settings.php:207
1359
+ msgid "Allow Account Deletion"
1360
+ msgstr "アカウント削除の許可"
1361
+
1362
+ #: classes/class.swpm-settings.php:208
1363
+ msgid "Allow users to delete their accounts."
1364
+ msgstr "会員によるアカウント削除を許可。"
1365
+
1366
+ #: classes/class.swpm-settings.php:210
1367
+ msgid "Force Strong Password for Members"
1368
+ msgstr "会員に強力なパスワードを強制"
1369
+
1370
+ #: classes/class.swpm-settings.php:211
1371
+ msgid ""
1372
+ "Enable this if you want the users to be forced to use a strong password for "
1373
+ "their accounts."
1374
+ msgstr ""
1375
+ "ユーザーに強力なパスワードを使うよう強制したい場合はこれを有効にします。"
1376
+
1377
+ #: classes/class.swpm-settings.php:213
1378
+ msgid "Use WordPress Timezone"
1379
+ msgstr "WordPress のタイムゾーンを使う"
1380
+
1381
+ #: classes/class.swpm-settings.php:214
1382
+ msgid ""
1383
+ "Use this option if you want to use the timezone value specified in your "
1384
+ "WordPress General Settings interface."
1385
+ msgstr ""
1386
+ "WordPressの一般設定画面で設定されているタイムゾーンの値を使いたい場合は、この"
1387
+ "オプションを使います。"
1388
+
1389
+ #: classes/class.swpm-settings.php:216
1390
+ msgid "Auto Delete Pending Account"
1391
+ msgstr "保留中アカウントの自動削除"
1392
+
1393
+ #: classes/class.swpm-settings.php:219
1394
+ msgid "Select how long you want to keep \"pending\" account."
1395
+ msgstr "「保留中」アカウントの保留期間を選択。"
1396
+
1397
+ #: classes/class.swpm-settings.php:221
1398
+ msgid "Admin Dashboard Access Permission"
1399
+ msgstr "管理ダッシュボードのアクセス許可"
1400
+
1401
+ #: classes/class.swpm-settings.php:224
1402
+ msgid ""
1403
+ "SWPM admin dashboard is accessible to admin users only (just like any other "
1404
+ "plugin). You can allow users with other WP user role to access the SWPM "
1405
+ "admin dashboard by selecting a value here."
1406
+ msgstr ""
1407
+ "SWPM管理ダッシュボードは管理ユーザーのみアクセス可能です(他のプラグインと同"
1408
+ "じ)。他のWP権限グループのユーザーにSWPM管理ダッシュボードへのアクセスを許可"
1409
+ "する場合は、ここでその権限を選択します。"
1410
+
1411
+ #: classes/class.swpm-settings.php:226
1412
+ msgid "Force WP User Synchronization"
1413
+ msgstr "WPユーザー同期を強制"
1414
+
1415
+ #: classes/class.swpm-settings.php:227
1416
+ msgid ""
1417
+ "Enable this option if you want to force the member login to be synchronized "
1418
+ "with WP user account. This can be useful if you are using another plugin "
1419
+ "that uses WP user records. For example: bbPress plugin."
1420
+ msgstr ""
1421
+ "会員ログインとWPユーザーアカウントの同期化を強制したい場合はこのオプションを"
1422
+ "有効にします。これは、WPユーザー情報を利用している他のプラグインを使っている"
1423
+ "場合に便利です。例:bbPressプラグイン。"
1424
+
1425
+ #: classes/class.swpm-settings.php:230
1426
+ msgid "Create Member Accounts for New WP Users"
1427
+ msgstr "新しいWPユーザー用に会員アカウントを作成"
1428
+
1429
+ #: classes/class.swpm-settings.php:232
1430
+ msgid "Enable Auto Create Member Accounts"
1431
+ msgstr "メンバーアカウントの自動作成を有効化"
1432
+
1433
+ #: classes/class.swpm-settings.php:233
1434
+ msgid ""
1435
+ "Enable this option to automatically create member accounts for any new WP "
1436
+ "user that is created by another plugin."
1437
+ msgstr ""
1438
+ "他のプラグインが新しいWPユーザーを作成した時に、自動的に会員アカウントを作成"
1439
+ "したい場合、このオプションを有効化します。"
1440
+
1441
+ #: classes/class.swpm-settings.php:236
1442
+ msgid "Default Membership Level"
1443
+ msgstr "デフォルト会員レベル"
1444
+
1445
+ #: classes/class.swpm-settings.php:239
1446
+ msgid ""
1447
+ "When automatically creating a member account using this feature, the "
1448
+ "membership level of the user will be set to the one you specify here."
1449
+ msgstr ""
1450
+ "この機能を使って会員アカウントを自動作成する時、そのユーザーの会員レベルはこ"
1451
+ "こで指定したレベルに設定されます。"
1452
+
1453
+ #: classes/class.swpm-settings.php:245
1454
+ msgid ""
1455
+ "When automatically creating a member account using this feature, the "
1456
+ "membership account status of the user will be set to the one you specify "
1457
+ "here."
1458
+ msgstr ""
1459
+ "この機能を使って会員アカウントを自動作成する時、そのユーザーの会員アカウント"
1460
+ "ステータスはここで指定した状態に設定されます。"
1461
+
1462
+ #: classes/class.swpm-settings.php:247
1463
+ msgid "Payment Notification Forward URL"
1464
+ msgstr "支払い通知転送URL"
1465
+
1466
+ #: classes/class.swpm-settings.php:248
1467
+ msgid ""
1468
+ "You can enter an URL here to forward the payment notification after the "
1469
+ "membership payment has been processed by this plugin. Useful if you want to "
1470
+ "forward the payment notification to an external script for further "
1471
+ "processing."
1472
+ msgstr ""
1473
+ "このプラグインで会費の支払いが処理された後、お支払い通知を転送するURLをここに"
1474
+ "入力できます。お支払い通知を外部スクリプトに転送して、さらに処理する必要があ"
1475
+ "る場合に便利です。"
1476
+
1477
+ #: classes/class.swpm-settings.php:251 views/add.php:65
1478
+ msgid "Terms and Conditions"
1479
+ msgstr "利用規約"
1480
+
1481
+ #: classes/class.swpm-settings.php:253
1482
+ msgid "Enable Terms and Conditions"
1483
+ msgstr "利用規約を有効化"
1484
+
1485
+ #: classes/class.swpm-settings.php:254
1486
+ msgid "Users must accept the terms before they can complete the registration."
1487
+ msgstr "登録を完了するには、ユーザーは利用規約に同意しなければなりません。"
1488
+
1489
+ #: classes/class.swpm-settings.php:255
1490
+ msgid "Terms and Conditions Page URL"
1491
+ msgstr "利用規約ページURL"
1492
+
1493
+ #: classes/class.swpm-settings.php:256
1494
+ msgid ""
1495
+ "Enter the URL of your terms and conditions page. You can create a WordPress "
1496
+ "page and specify your terms in there then specify the URL of that page in "
1497
+ "the above field."
1498
+ msgstr ""
1499
+ "利用規約ページのURLを入力してください。WordPressの規約ページを作成して、その"
1500
+ "ページのURLを上の欄に入力することもできます。"
1501
+
1502
+ #: classes/class.swpm-settings.php:257
1503
+ msgid "Enable Privacy Policy"
1504
+ msgstr "プライバシーポリシーを有効化"
1505
+
1506
+ #: classes/class.swpm-settings.php:258
1507
+ msgid "Users must accept it before they can complete the registration."
1508
+ msgstr "登録を完了するには、ユーザーはこれに同意しなければなりません。"
1509
+
1510
+ #: classes/class.swpm-settings.php:259
1511
+ msgid "Privacy Policy Page URL"
1512
+ msgstr "プライバシーポリシーページ URL"
1513
+
1514
+ #: classes/class.swpm-settings.php:260
1515
+ msgid "Enter the URL of your privacy policy page."
1516
+ msgstr "プライバシーポリシーページのURLを入力してください。"
1517
+
1518
+ #: classes/class.swpm-settings.php:350 classes/class.swpm-settings.php:396
1519
+ #: classes/class.swpm-settings.php:425
1520
+ msgid "Settings updated!"
1521
+ msgstr "設定を更新しました!"
1522
+
1523
+ #: classes/class.swpm-settings.php:355
1524
+ msgid "General Plugin Settings."
1525
+ msgstr "一般プラグイン設定。"
1526
+
1527
+ #: classes/class.swpm-settings.php:359
1528
+ msgid "Page Setup and URL Related settings."
1529
+ msgstr "ページ構成とURL関連の設定。"
1530
+
1531
+ #: classes/class.swpm-settings.php:362
1532
+ msgid ""
1533
+ "The following pages are required for the plugin to function correctly. These "
1534
+ "pages were automatically created by the plugin at install time."
1535
+ msgstr ""
1536
+ "以下のページは、プラグインが正しく機能するために必要なものです。これらのペー"
1537
+ "ジは、プラグインのインストール時に自動的に作成されています。"
1538
+
1539
+ #: classes/class.swpm-settings.php:367
1540
+ msgid "Testing and Debug Related Settings."
1541
+ msgstr "テスト & デバッグ関連の設定。"
1542
+
1543
+ #: classes/class.swpm-settings.php:371
1544
+ msgid ""
1545
+ "This email will be sent to your users when they complete the registration "
1546
+ "and become a member."
1547
+ msgstr "このメールは、登録を完了して会員になったユーザーに配信されます。"
1548
+
1549
+ #: classes/class.swpm-settings.php:375
1550
+ msgid ""
1551
+ "This email will be sent to your users when they use the password reset "
1552
+ "functionality."
1553
+ msgstr "このメールは、パスワードリセット機能を使ったユーザーに送信されます。"
1554
+
1555
+ #: classes/class.swpm-settings.php:381
1556
+ msgid ""
1557
+ "This interface lets you custsomize the various emails that gets sent to your "
1558
+ "members for various actions. The default settings should be good to get your "
1559
+ "started."
1560
+ msgstr ""
1561
+ "この画面では、様々な行為に対して会員に送信される諸々のメールをカスタマイズで"
1562
+ "きます。デフォルト設定でもサイト立ち上げには十分使えるはずです。"
1563
+
1564
+ #: classes/class.swpm-settings.php:385 views/admin_tools_settings.php:82
1565
+ msgid "This documentation"
1566
+ msgstr "このマニュアル"
1567
+
1568
+ #: classes/class.swpm-settings.php:386
1569
+ msgid ""
1570
+ " explains what email merge tags you can use in the email body field to "
1571
+ "customize it (if you want to)."
1572
+ msgstr ""
1573
+ " は、メール本文をカスタマイズするために、どんな置き換えタグが使えるかを説明し"
1574
+ "ています(ご希望の場合)。"
1575
+
1576
+ #: classes/class.swpm-settings.php:399
1577
+ msgid "Settings in this section apply to all emails."
1578
+ msgstr "このセクションの設定はすべてのメールに適用します。"
1579
+
1580
+ #: classes/class.swpm-settings.php:403
1581
+ msgid ""
1582
+ "This email will be sent to your users after account upgrade (when an "
1583
+ "existing member pays for a new membership level)."
1584
+ msgstr ""
1585
+ "このメールは、アカウントをアップグレード後(既存会員が新しい会員レベルの会費"
1586
+ "を払った時)すべてのユーザーに送信されます。"
1587
+
1588
+ #: classes/class.swpm-settings.php:407
1589
+ msgid ""
1590
+ "This email will be sent to your members when you use the bulk account "
1591
+ "activate and notify action."
1592
+ msgstr ""
1593
+ "このメールは、あなたがアカウントの一括有効化と通知機能を使った時に会員に送信"
1594
+ "されます。"
1595
+
1596
+ #: classes/class.swpm-settings.php:408
1597
+ msgid ""
1598
+ " You cannot use email merge tags in this email. You can only use generic "
1599
+ "text."
1600
+ msgstr ""
1601
+ " このメールには置き換えタグは使えません。一般的なテキスト文のみ使えます。"
1602
+
1603
+ #: classes/class.swpm-settings.php:413
1604
+ msgid ""
1605
+ "This email will be sent if Email Activation is enabled for a Membership "
1606
+ "Level."
1607
+ msgstr ""
1608
+ "このメールは、会員レベルで「メールによる有効化」を有効にしている場合に送信さ"
1609
+ "れます。"
1610
+
1611
+ #: classes/class.swpm-settings.php:417
1612
+ msgid ""
1613
+ "This email will be sent to prompt users to complete registration after the "
1614
+ "payment."
1615
+ msgstr ""
1616
+ "このメールは、支払い後、登録を完了するようにユーザーに促すために送信されま"
1617
+ "す。"
1618
+
1619
+ #: classes/class.swpm-settings.php:428
1620
+ msgid "This page allows you to configure some advanced features of the plugin."
1621
+ msgstr "このページでは、このプラグインの高度な機能を設定できます。"
1622
+
1623
+ #: classes/class.swpm-settings.php:432
1624
+ msgid ""
1625
+ "This section allows you to configure automatic creation of member accounts "
1626
+ "when new WP User records are created by another plugin. It can be useful if "
1627
+ "you are using another plugin that creates WP user records and you want them "
1628
+ "to be recognized in the membership plugin."
1629
+ msgstr ""
1630
+ "このセクションでは、他のプラグインが新規WPユーザーデータを作成した時に、会員"
1631
+ "アカウントを自動作成するように設定できます。WPユーザーデータを作成する他のプ"
1632
+ "ラグインを使っていて、その情報をこちらの会員情報に反映したい場合に便利です。"
1633
+
1634
+ #: classes/class.swpm-settings.php:436
1635
+ msgid ""
1636
+ "This section allows you to configure terms and conditions and privacy policy "
1637
+ "that users must accept at registration time."
1638
+ msgstr ""
1639
+ "このセクションでは、ユーザー登録時に同意させる利用規約やプライバシーポリシー"
1640
+ "を設定できます。"
1641
+
1642
+ #: classes/class.swpm-settings.php:565
1643
+ msgid "Simple WP Membership::Settings"
1644
+ msgstr "Simple WP Membership::設定"
1645
+
1646
+ #: classes/class.swpm-utils-member.php:36
1647
+ #: classes/class.swpm-utils-member.php:44
1648
+ #: classes/class.swpm-utils-member.php:52
1649
+ #: classes/class.swpm-utils-member.php:62
1650
+ msgid "User is not logged in."
1651
+ msgstr "ログインしていません。"
1652
+
1653
+ #: classes/class.swpm-utils-member.php:80
1654
+ msgid "No Expiry"
1655
+ msgstr "無期限"
1656
+
1657
+ #: classes/class.swpm-utils-misc.php:50
1658
+ msgid "Registration"
1659
+ msgstr "登録"
1660
+
1661
+ #: classes/class.swpm-utils-misc.php:73
1662
+ msgid "Member Login"
1663
+ msgstr "メンバーログイン"
1664
+
1665
+ #: classes/class.swpm-utils-misc.php:96
1666
+ #: classes/shortcode-related/class.swpm-shortcodes-handler.php:117
1667
+ msgid "Profile"
1668
+ msgstr "プロフィール"
1669
+
1670
+ #: classes/class.swpm-utils-misc.php:119
1671
+ msgid "Password Reset"
1672
+ msgstr "パスワードのリセット"
1673
+
1674
+ #: classes/class.swpm-utils-misc.php:168
1675
+ #, php-format
1676
+ msgid ""
1677
+ "You will be automatically redirected in a few seconds. If not, please %s."
1678
+ msgstr ""
1679
+ "数秒後に自動でリダイレクトされます。リダイレクトされない場合は %s してくださ"
1680
+ "い。"
1681
+
1682
+ #: classes/class.swpm-utils-misc.php:172
1683
+ msgid "Action Status"
1684
+ msgstr "アクション状態"
1685
+
1686
+ #: classes/class.swpm-utils-misc.php:274
1687
+ msgid "Not a Member?"
1688
+ msgstr "会員ではないですか ?"
1689
+
1690
+ #: classes/class.swpm-utils-misc.php:285
1691
+ msgid "renew"
1692
+ msgstr "アカウントを更新"
1693
+
1694
+ #: classes/class.swpm-utils-misc.php:285
1695
+ msgid " your account to gain access to this content."
1696
+ msgstr " すると、このコンテンツにアクセスできるようになります。"
1697
+
1698
+ #: classes/class.swpm-utils-misc.php:343 classes/class.swpm-utils-misc.php:349
1699
+ msgid "Error! This action ("
1700
+ msgstr "エラー!このアクション("
1701
+
1702
+ #: classes/class.swpm-utils-misc.php:421
1703
+ msgid "(Please Select)"
1704
+ msgstr "(選択してください)"
1705
+
1706
+ #: classes/class.swpm-utils-template.php:38
1707
+ msgid "Error! Failed to find a template path for the specified template: "
1708
+ msgstr "エラー!指定のテンプレートへのパスが見つかりません: "
1709
+
1710
+ #: classes/class.swpm-utils.php:101
1711
+ msgid "Never"
1712
+ msgstr "期限なし"
1713
+
1714
+ #: classes/class.swpm-utils.php:116 views/admin_members_list.php:19
1715
+ msgid "Active"
1716
+ msgstr "有効"
1717
+
1718
+ #: classes/class.swpm-utils.php:117 views/admin_members_list.php:20
1719
+ msgid "Inactive"
1720
+ msgstr "無効"
1721
+
1722
+ #: classes/class.swpm-utils.php:118 views/admin_members_list.php:21
1723
+ msgid "Activation Required"
1724
+ msgstr "有効化が必要"
1725
+
1726
+ #: classes/class.swpm-utils.php:119 views/admin_members_list.php:22
1727
+ msgid "Pending"
1728
+ msgstr "保留"
1729
+
1730
+ #: classes/class.swpm-utils.php:120 views/admin_members_list.php:24
1731
+ msgid "Expired"
1732
+ msgstr "期限切れ"
1733
+
1734
+ #: classes/class.swpm-utils.php:414 views/account_delete_warning.php:3
1735
+ msgid "Delete Account"
1736
+ msgstr "アカウントの削除"
1737
+
1738
+ #: classes/admin-includes/class.swpm-payment-buttons-list-table.php:75
1739
+ msgid "Payment Button ID"
1740
+ msgstr "支払ボタン ID"
1741
+
1742
+ #: classes/admin-includes/class.swpm-payment-buttons-list-table.php:76
1743
+ msgid "Payment Button Title"
1744
+ msgstr "支払ボタンタイトル"
1745
+
1746
+ #: classes/admin-includes/class.swpm-payment-buttons-list-table.php:77
1747
+ msgid "Membership Level ID"
1748
+ msgstr "会員レベル ID"
1749
+
1750
+ #: classes/admin-includes/class.swpm-payment-buttons-list-table.php:78
1751
+ msgid "Button Type"
1752
+ msgstr "ボタンタイプ"
1753
+
1754
+ #: classes/admin-includes/class.swpm-payment-buttons-list-table.php:79
1755
+ msgid "Button Shortcode"
1756
+ msgstr "ボタンショートコード"
1757
+
1758
+ #: classes/admin-includes/class.swpm-payment-buttons-list-table.php:127
1759
+ #: views/admin_members_list.php:9
1760
+ #: views/payments/admin_all_payment_transactions.php:32
1761
+ msgid "The selected entry was deleted!"
1762
+ msgstr "選択したエントリーは削除されました!"
1763
+
1764
+ #: classes/admin-includes/class.swpm-payments-admin-menu.php:21
1765
+ msgid "Simple Membership::Payments"
1766
+ msgstr "Simple Membership::支払"
1767
+
1768
+ #: classes/admin-includes/class.swpm-payments-admin-menu.php:25
1769
+ msgid "Transactions"
1770
+ msgstr "トランザクション"
1771
+
1772
+ #: classes/admin-includes/class.swpm-payments-admin-menu.php:26
1773
+ msgid "Manage Payment Buttons"
1774
+ msgstr "支払いボタンの管理"
1775
+
1776
+ #: classes/admin-includes/class.swpm-payments-admin-menu.php:27
1777
+ #: views/payments/admin_payment_buttons.php:27
1778
+ msgid "Create New Button"
1779
+ msgstr "新規ボタン作成"
1780
+
1781
+ #: classes/admin-includes/class.swpm-payments-list-table.php:57
1782
+ #: views/template-1.php:95 views/template-2.php:97
1783
+ msgid "View Profile"
1784
+ msgstr "プロフィールを見る"
1785
+
1786
+ #: classes/admin-includes/class.swpm-payments-list-table.php:76
1787
+ msgid "Row ID"
1788
+ msgstr "列 ID"
1789
+
1790
+ #: classes/admin-includes/class.swpm-payments-list-table.php:77
1791
+ #: views/forgot_password.php:5
1792
+ msgid "Email Address"
1793
+ msgstr "メールアドレス"
1794
+
1795
+ #: classes/admin-includes/class.swpm-payments-list-table.php:80
1796
+ msgid "Member Profile"
1797
+ msgstr "会員プロフィール"
1798
+
1799
+ #: classes/admin-includes/class.swpm-payments-list-table.php:82
1800
+ msgid "Transaction ID"
1801
+ msgstr "トランザクション ID"
1802
+
1803
+ #: classes/admin-includes/class.swpm-payments-list-table.php:83
1804
+ msgid "Subscriber ID"
1805
+ msgstr "定期購読者ID"
1806
+
1807
+ #: classes/admin-includes/class.swpm-payments-list-table.php:84
1808
+ msgid "Amount"
1809
+ msgstr "金額"
1810
+
1811
+ #: classes/shortcode-related/class.swpm-shortcodes-handler.php:60
1812
+ msgid "Your membership profile will be updated to reflect the payment."
1813
+ msgstr "お支払いを反映して会員プロフィールが更新されます。"
1814
+
1815
+ #: classes/shortcode-related/class.swpm-shortcodes-handler.php:61
1816
+ msgid "Your profile username: "
1817
+ msgstr "あなたのプロフィールユーザー名: "
1818
+
1819
+ #: classes/shortcode-related/class.swpm-shortcodes-handler.php:73
1820
+ msgid "Click on the following link to complete the registration."
1821
+ msgstr "以下のリンクをクリックして会員登録を完了してください。"
1822
+
1823
+ #: classes/shortcode-related/class.swpm-shortcodes-handler.php:74
1824
+ msgid "Click here to complete your paid registration"
1825
+ msgstr "有料登録を完了するにはこちらをクリック"
1826
+
1827
+ #: classes/shortcode-related/class.swpm-shortcodes-handler.php:79
1828
+ msgid ""
1829
+ "If you have just made a membership payment then your payment is yet to be "
1830
+ "processed. Please check back in a few minutes. An email will be sent to you "
1831
+ "with the details shortly."
1832
+ msgstr ""
1833
+ "会員登録のためのお支払いを完了したばかりでしたら、まだ手続きの処理中です。数"
1834
+ "分後にもう一度ご確認ください。間もなく詳細についてメールが送付されます。"
1835
+
1836
+ #: classes/shortcode-related/class.swpm-shortcodes-handler.php:93
1837
+ msgid "Expiry: "
1838
+ msgstr "有効期限: "
1839
+
1840
+ #: classes/shortcode-related/class.swpm-shortcodes-handler.php:95
1841
+ msgid "You are not logged-in as a member"
1842
+ msgstr "会員としてログインしていません"
1843
+
1844
+ #: classes/shortcode-related/class.swpm-shortcodes-handler.php:115
1845
+ msgid "Logged in as: "
1846
+ msgstr "ログイン中のアカウント: "
1847
+
1848
+ #: classes/shortcode-related/class.swpm-shortcodes-handler.php:118
1849
+ #: views/loggedin.php:31
1850
+ msgid "Logout"
1851
+ msgstr "ログアウト"
1852
+
1853
+ #: classes/shortcode-related/class.swpm-shortcodes-handler.php:121
1854
+ msgid "Login Here"
1855
+ msgstr "ここからログイン"
1856
+
1857
+ #: classes/shortcode-related/class.swpm-shortcodes-handler.php:122
1858
+ msgid "Not a member? "
1859
+ msgstr "会員ではないですか? "
1860
+
1861
+ #: classes/shortcode-related/class.swpm-shortcodes-handler.php:123
1862
+ msgid "Join Now"
1863
+ msgstr "今すぐ登録"
1864
+
1865
+ #: ipn/swpm-smart-checkout-ipn.php:260 ipn/swpm-smart-checkout-ipn.php:285
1866
+ #, php-format
1867
+ msgid "Error occured during payment verification. Error code: %d. Message: %s"
1868
+ msgstr "支払い認証時にエラーが起こりました。エラーコード:%d。メッセージ:%s"
1869
+
1870
+ #: ipn/swpm-smart-checkout-ipn.php:298
1871
+ #, php-format
1872
+ msgid ""
1873
+ "Payment check failed: invalid amount received. Expected %s %s, got %s %s."
1874
+ msgstr ""
1875
+ "支払い確認に失敗しました:無効な金額を受領。請求額 %s %s、受領額 %s %s。"
1876
+
1877
+ #: ipn/swpm-smart-checkout-ipn.php:315
1878
+ msgid "Empty payment data received."
1879
+ msgstr "空の支払いデータを受領しました。"
1880
+
1881
+ #: ipn/swpm-smart-checkout-ipn.php:355
1882
+ msgid "IPN product validation failed. Check debug log for more details."
1883
+ msgstr "IPN商品認証に失敗しました。詳細はデバッグログを確認してください。"
1884
+
1885
+ #: views/account_delete_warning.php:7
1886
+ msgid ""
1887
+ "You are about to delete an account. This will delete user data associated "
1888
+ "with this account. "
1889
+ msgstr ""
1890
+ "アカウントを削除しようとしています。これで、このアカウントに紐づいたユーザー"
1891
+ "データがすべて削除されます。 "
1892
+
1893
+ #: views/account_delete_warning.php:8
1894
+ msgid "It will also delete associated WordPress user account."
1895
+ msgstr "これにより紐づいたWordPressユーザーアカウントも削除されます。"
1896
+
1897
+ #: views/account_delete_warning.php:9
1898
+ msgid ""
1899
+ "(NOTE: for safety, we do not allow deletion of any associated WordPress "
1900
+ "account with administrator role)."
1901
+ msgstr ""
1902
+ "(注記:安全理由から、このプラグインではWordPressアカウントの管理者権限を持つ"
1903
+ "アカウントは削除できないようになっています)。"
1904
+
1905
+ #: views/account_delete_warning.php:10
1906
+ msgid "Continue?"
1907
+ msgstr "続行しますか?"
1908
+
1909
+ #: views/account_delete_warning.php:13
1910
+ msgid "Password: "
1911
+ msgstr "パスワード: "
1912
+
1913
+ #: views/account_delete_warning.php:14
1914
+ msgid "Confirm Account Deletion"
1915
+ msgstr "アカウント削除の確認"
1916
+
1917
+ #: views/add.php:24 views/admin_add.php:19 views/admin_edit.php:44
1918
+ #: views/edit.php:31 views/login.php:17
1919
+ msgid "Password"
1920
+ msgstr "パスワード"
1921
+
1922
+ #: views/add.php:28 views/edit.php:35
1923
+ msgid "Repeat Password"
1924
+ msgstr "パスワードを再入力"
1925
+
1926
+ #: views/add.php:65
1927
+ msgid "I accept the "
1928
+ msgstr "承諾します "
1929
+
1930
+ #: views/add.php:77
1931
+ msgid "I agree to the "
1932
+ msgstr "同意します "
1933
+
1934
+ #: views/add.php:77
1935
+ msgid "Privacy Policy"
1936
+ msgstr "プライバシーポリシー"
1937
+
1938
+ #: views/add.php:88
1939
+ msgid "Register"
1940
+ msgstr "登録"
1941
+
1942
+ #: views/admin_add.php:7
1943
+ msgid "Create a brand new user and add it to this site."
1944
+ msgstr "新しいユーザーを作成し、このサイトに追加します。"
1945
+
1946
+ #: views/admin_add.php:11 views/admin_add.php:15 views/admin_add_level.php:12
1947
+ #: views/admin_add_level.php:16 views/admin_add_level.php:20
1948
+ #: views/admin_edit.php:19 views/admin_edit.php:40
1949
+ #: views/admin_edit_level.php:16 views/admin_edit_level.php:20
1950
+ #: views/admin_edit_level.php:24
1951
+ msgid "(required)"
1952
+ msgstr "(必須)"
1953
+
1954
+ #: views/admin_add.php:15 views/admin_edit.php:40
1955
+ msgid "E-mail"
1956
+ msgstr "メール"
1957
+
1958
+ #: views/admin_add.php:19
1959
+ msgid "(twice, required)"
1960
+ msgstr "(二度入力、必須)"
1961
+
1962
+ #: views/admin_add.php:24 views/admin_edit.php:48
1963
+ msgid "Strength indicator"
1964
+ msgstr "強度の指標"
1965
+
1966
+ #: views/admin_add.php:25 views/admin_edit.php:49
1967
+ msgid ""
1968
+ "Hint: The password should be at least seven characters long. To make it "
1969
+ "stronger, use upper and lower case letters, numbers and symbols like ! \" ? "
1970
+ "$ % ^ &amp; )."
1971
+ msgstr ""
1972
+ "ヒント: パスワードは7文字以上。より強力なパスワードにするために、大文字・小文"
1973
+ "字を使い、数字や ! \\\" ? $ % ^ &amp; ) 等の記号の使用を推奨します。"
1974
+
1975
+ #: views/admin_add.php:29 views/admin_edit.php:53 views/loggedin.php:10
1976
+ msgid "Account Status"
1977
+ msgstr "アカウント状態"
1978
+
1979
+ #: views/admin_add.php:39
1980
+ msgid "Add New Member "
1981
+ msgstr "新規メンバーの追加 "
1982
+
1983
+ #: views/admin_addon_settings.php:3
1984
+ msgid ""
1985
+ "Some of the simple membership plugin's addon settings and options will be "
1986
+ "displayed here (if you have them)"
1987
+ msgstr ""
1988
+ "アドオンの設定やオプションがここに表示されます(インストールされている場"
1989
+ "合)。"
1990
+
1991
+ #: views/admin_addon_settings.php:8
1992
+ msgid "Save Changes"
1993
+ msgstr "変更を保存"
1994
 
1995
+ #: views/admin_add_level.php:6
1996
+ msgid "Add Membership Level"
1997
+ msgstr "新規会員レベルの追加"
1998
 
1999
+ #: views/admin_add_level.php:7
2000
+ msgid "Create new membership level."
2001
+ msgstr "新規会員レベルを作成。"
2002
 
2003
+ #: views/admin_add_level.php:12 views/admin_edit_level.php:16
2004
+ msgid "Membership Level Name"
2005
+ msgstr "会員レベル名"
2006
 
2007
+ #: views/admin_add_level.php:16 views/admin_edit_level.php:20
2008
+ msgid "Default WordPress Role"
2009
+ msgstr "WordPress のデフォルトユーザー権限"
2010
 
2011
+ #: views/admin_add_level.php:20 views/admin_edit_level.php:24
2012
+ msgid "Access Duration"
 
 
 
2013
  msgstr "有効期限"
2014
 
2015
+ #: views/admin_add_level.php:23
2016
  msgid "No Expiry (Access for this level will not expire until cancelled"
2017
  msgstr "無期限(キャンセルしない限り有効)"
2018
 
2019
+ #: views/admin_add_level.php:24 views/admin_add_level.php:26
2020
+ #: views/admin_add_level.php:28 views/admin_add_level.php:30
2021
+ #: views/admin_edit_level.php:28 views/admin_edit_level.php:31
2022
+ #: views/admin_edit_level.php:34 views/admin_edit_level.php:37
2023
+ msgid "Expire After"
2024
  msgstr "有効期限"
2025
 
2026
+ #: views/admin_add_level.php:25 views/admin_edit_level.php:29
2027
+ msgid "Days (Access expires after given number of days)"
2028
+ msgstr "日(指定した日数の間有効)"
2029
 
2030
+ #: views/admin_add_level.php:27
2031
+ msgid "Weeks (Access expires after given number of weeks"
2032
+ msgstr "週(指定した週数の間有効)"
2033
 
2034
+ #: views/admin_add_level.php:29 views/admin_edit_level.php:35
2035
+ msgid "Months (Access expires after given number of months)"
2036
+ msgstr "ヶ月(指定した月数の間有効)"
2037
 
2038
+ #: views/admin_add_level.php:31 views/admin_edit_level.php:38
2039
+ msgid "Years (Access expires after given number of years)"
2040
+ msgstr "年(指定した年数の間有効)"
2041
 
2042
+ #: views/admin_add_level.php:32 views/admin_edit_level.php:40
2043
+ msgid "Fixed Date Expiry"
2044
+ msgstr "有効期限日を指定"
2045
 
2046
+ #: views/admin_add_level.php:33 views/admin_edit_level.php:41
2047
+ msgid "(Access expires on a fixed date)"
2048
+ msgstr "(指定した日付まで有効)"
2049
 
2050
+ #: views/admin_add_level.php:38 views/admin_edit_level.php:46
2051
+ msgid "Email Activation"
2052
+ msgstr "メールでの有効化"
2053
 
2054
+ #: views/admin_add_level.php:43
2055
+ msgid ""
2056
+ "Enable new user activation via email. When enabled, members will need to "
2057
+ "click on an activation link that is sent to their email address to activate "
2058
+ "the account. Useful for free membership. "
2059
+ msgstr ""
2060
+ "新規ユーザーのメールでの有効化を有効にします。有効にすると、会員はアカウント"
2061
+ "を有効化するために、登録メールアドレスに送られたメールの有効化リンクをクリッ"
2062
+ "クする必要があります。無料会員制に便利です。 "
2063
 
2064
+ #: views/admin_add_level.php:44 views/admin_edit_level.php:52
2065
+ msgid "View Documentation"
2066
+ msgstr "マニュアルを閲覧"
2067
 
2068
+ #: views/admin_add_level.php:45 views/admin_edit_level.php:53
2069
+ msgid "Note:"
2070
+ msgstr "注記:"
 
 
 
2071
 
2072
+ #: views/admin_add_level.php:45 views/admin_edit_level.php:53
2073
+ msgid ""
2074
+ "If enabled, decryptable member password is temporarily stored in the "
2075
+ "database until the account is activated."
2076
+ msgstr ""
2077
+ "有効にした場合、アカウントが有効化されるまで、復号可能な会員パスワードがデー"
2078
+ "タベースに仮保存されます。"
2079
 
2080
+ #: views/admin_add_level.php:52
2081
+ msgid "Add New Membership Level "
2082
+ msgstr "新しい会員レベルの追加 "
2083
 
2084
+ #: views/admin_add_ons_page.php:7
2085
+ msgid "Simple WP Membership::Add-ons"
2086
+ msgstr "Simple WP Membership::アドオン"
2087
 
2088
+ #: views/admin_category_list.php:5
2089
+ msgid ""
2090
+ "First of all, globally protect the category on your site by selecting "
2091
+ "\"General Protection\" from the drop-down box below and then select the "
2092
+ "categories that should be protected from non-logged in users."
2093
+ msgstr ""
2094
+ "まず、サイト全体でカテゴリーを保護するには、ドロップダウンメニューから「一般"
2095
+ "保護」を選び、ログインしていないユーザーに非公開にするカテゴリーを選択しま"
2096
+ "す。"
2097
 
2098
+ #: views/admin_category_list.php:8
2099
+ msgid ""
2100
+ "Next, select an existing membership level from the drop-down box below and "
2101
+ "then select the categories you want to grant access to (for that particular "
2102
+ "membership level)."
2103
+ msgstr ""
2104
+ "次にドロップダウンメニューから既存の会員レベルを選択し、その会員レベルのユー"
2105
+ "ザーにのみ公開するカテゴリーを選びます。"
2106
 
2107
+ #: views/admin_category_list.php:11 views/admin_post_list.php:11
2108
+ msgid "Read the "
2109
+ msgstr "参照 "
 
2110
 
2111
+ #: views/admin_category_list.php:11
2112
+ msgid "category protection documentation"
2113
+ msgstr "カテゴリー保護に関するマニュアル"
2114
 
2115
+ #: views/admin_category_list.php:17 views/admin_post_list.php:27
2116
+ msgid "Membership Level:"
2117
+ msgstr "会員レベル:"
2118
 
2119
+ #: views/admin_category_list.php:19 views/admin_post_list.php:29
2120
+ msgid "General Protection"
2121
+ msgstr "一般保護"
2122
 
2123
+ #: views/admin_category_list.php:23 views/admin_post_list.php:33
2124
+ #: views/edit.php:83
2125
+ msgid "Update"
2126
+ msgstr "更新"
2127
 
2128
+ #: views/admin_edit.php:11
2129
+ msgid "Edit Member"
2130
+ msgstr "会員の編集"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2131
 
2132
+ #: views/admin_edit.php:13
2133
+ msgid "Edit existing member details."
2134
+ msgstr "既存会員の詳細を編集."
 
2135
 
2136
+ #: views/admin_edit.php:14
2137
+ msgid " You are currenty editing member with member ID: "
2138
+ msgstr " 現在編集している会員のIDは: "
 
2139
 
2140
+ #: views/admin_edit.php:44
2141
+ msgid "(twice, leave empty to retain old password)"
2142
+ msgstr "(二度入力。同じパスワードを利用する場合は空欄にする。)"
 
2143
 
2144
+ #: views/admin_edit.php:59
2145
+ msgid ""
2146
+ "This is the member's account status. If you want to manually activate an "
2147
+ "expired member's account then read"
2148
+ msgstr ""
2149
+ "これは会員のアカウントステータスです。期限切れの会員アカウントを手動で有効に"
2150
+ "する方法については"
2151
 
2152
+ #: views/admin_edit.php:60
2153
+ msgid "this documentation"
2154
+ msgstr "このマニュアル"
2155
 
2156
+ #: views/admin_edit.php:61
2157
+ msgid " to learn how to do it."
2158
+ msgstr " をご覧ください。"
2159
 
2160
+ #: views/admin_edit.php:66
2161
+ msgid "Notify User"
2162
+ msgstr "会員に知らせる"
2163
 
2164
+ #: views/admin_edit.php:69
2165
+ msgid ""
2166
+ "You can use this option to send a quick notification email to this member "
2167
+ "(the email will be sent when you hit the save button below)."
2168
+ msgstr ""
2169
+ "このオプションを使って、このメンバーに今すぐ通知メールを送ることができます"
2170
+ "(下の「保存」ボタンを押すとすぐにメールが送られます)"
2171
 
2172
+ #: views/admin_edit.php:75
2173
+ msgid "Subscriber ID/Reference"
2174
+ msgstr "購読者 ID/参照"
2175
 
2176
+ #: views/admin_edit.php:79
2177
+ msgid "Last Accessed Date"
2178
+ msgstr "最終アクセス日"
2179
 
2180
+ #: views/admin_edit.php:82 views/admin_edit.php:89
2181
+ msgid "This value gets updated when this member logs into your site."
2182
+ msgstr "この会員があなたのサイトにログインした時、この値が更新されます。"
2183
 
2184
+ #: views/admin_edit.php:86
2185
+ msgid "Last Accessed From IP"
2186
+ msgstr "最終アクセスしたIP"
2187
 
2188
+ #: views/admin_edit.php:97
2189
+ msgid "Save Data"
2190
+ msgstr "データを保存"
2191
 
2192
+ #: views/admin_edit.php:102
2193
+ msgid "Delete User Profile"
2194
+ msgstr "ユーザープロフィールを削除"
2195
 
2196
+ #: views/admin_edit_level.php:6
2197
+ msgid "Edit membership level"
2198
+ msgstr "会員レベルを編集"
2199
 
2200
+ #: views/admin_edit_level.php:9
2201
+ msgid ""
2202
+ "You can edit details of a selected membership level from this interface. "
2203
+ msgstr "この画面より選択中の会員レベルの詳細を編集できます。 "
2204
 
2205
+ #: views/admin_edit_level.php:10
2206
+ msgid "You are currently editing: "
2207
+ msgstr "現在編集中: "
2208
 
2209
+ #: views/admin_edit_level.php:27
2210
+ msgid "No Expiry (Access for this level will not expire until cancelled)"
2211
+ msgstr "無期限(キャンセルしない限り有効)"
2212
 
2213
+ #: views/admin_edit_level.php:32
2214
+ msgid "Weeks (Access expires after given number of weeks)"
2215
+ msgstr "週(指定した数の週の間有効)"
2216
 
2217
+ #: views/admin_edit_level.php:51
2218
+ msgid ""
2219
+ "Enable new user activation via email. When enabled, members will need to "
2220
+ "click on an activation link that is sent to their email address to activate "
2221
+ "the account. Useful for free membership."
2222
+ msgstr ""
2223
+ "新規ユーザーのメールでの有効化を有効にします。有効にすると、会員はアカウント"
2224
+ "を有効化するために、登録メールアドレスに送られたメールの有効化リンクをクリッ"
2225
+ "クする必要があります。無料会員制に便利です。"
2226
 
2227
+ #: views/admin_edit_level.php:60
2228
+ msgid "Save Membership Level "
2229
+ msgstr "会員レベルを保存 "
2230
 
2231
+ #: views/admin_membership_manage.php:18
2232
+ msgid "Example Content Protection Settings"
2233
+ msgstr "コンテンツ保護の設定例"
2234
 
2235
+ #: views/admin_members_list.php:18
2236
+ msgid "All"
2237
+ msgstr "全て"
2238
 
2239
+ #: views/admin_members_list.php:23
2240
+ msgid "Incomplete"
2241
+ msgstr "不完全"
2242
 
2243
+ #: views/admin_member_form_common_part.php:23
2244
+ #: includes/swpm_mda_show_profile.php:37
2245
+ msgid "Gender"
2246
+ msgstr "性別"
2247
 
2248
+ #: views/admin_member_form_common_part.php:30 views/edit.php:47
2249
+ #: includes/swpm_mda_show_profile.php:34
2250
+ msgid "Phone"
2251
+ msgstr "電話番号"
2252
 
2253
+ #: views/admin_member_form_common_part.php:34 views/edit.php:51
2254
+ msgid "Street"
2255
+ msgstr "番地"
2256
 
2257
+ #: views/admin_member_form_common_part.php:38 views/edit.php:55
2258
+ msgid "City"
2259
+ msgstr "市区町村"
2260
 
2261
+ #: views/admin_member_form_common_part.php:42 views/edit.php:59
2262
+ msgid "State"
2263
+ msgstr "都道府県"
2264
 
2265
+ #: views/admin_member_form_common_part.php:46 views/edit.php:63
2266
+ msgid "Zipcode"
2267
+ msgstr "郵便番号"
2268
 
2269
+ #: views/admin_member_form_common_part.php:50 views/edit.php:67
2270
+ #: includes/swpm_mda_show_profile.php:33
2271
+ msgid "Country"
2272
+ msgstr "国"
2273
 
2274
+ #: views/admin_member_form_common_part.php:54
2275
+ #: includes/swpm_mda_show_profile.php:38
2276
+ msgid "Company"
2277
+ msgstr "会社"
2278
 
2279
+ #: views/admin_member_form_common_part.php:58
2280
+ #: includes/swpm_mda_show_profile.php:36
2281
+ msgid "Member Since"
2282
+ msgstr "会員登録日"
2283
 
2284
+ #: views/admin_post_list.php:5
2285
+ msgid ""
2286
+ "First of all, globally protect posts and pages on your site by selecting "
2287
+ "\"General Protection\" from the drop-down box below and then select posts "
2288
+ "and pages that should be protected from non-logged in users."
2289
+ msgstr ""
2290
+ "まず、サイト全体で投稿や固定ページを保護するには、ドロップダウンメニューから"
2291
+ "「一般保護」を選び、ログインしていないユーザーに非公開にする投稿や固定ページ"
2292
+ "を選択します。"
2293
 
2294
+ #: views/admin_post_list.php:8
2295
+ msgid ""
2296
+ "Next, select an existing membership level from the drop-down box below and "
2297
+ "then select posts and pages you want to grant access to (for that particular "
2298
+ "membership level)."
2299
+ msgstr ""
2300
+ "次に、下のドロップダウンメニューから既存の会員レベルを選択し、アクセス許可し"
2301
+ "たい投稿や固定ページを選択します(その特定の会員レベルのユーザーに対し)。"
2302
 
2303
+ #: views/admin_post_list.php:11
2304
+ msgid "bulk protect posts and pages documentation"
2305
+ msgstr "投稿や固定ページの一括保護のマニュアル"
2306
 
2307
+ #: views/admin_post_list.php:11
2308
+ msgid " to learn how to use it."
2309
+ msgstr " 使い方について。"
2310
 
2311
+ #: views/admin_post_list.php:21
2312
+ msgid "Posts"
2313
+ msgstr "投稿"
2314
 
2315
+ #: views/admin_post_list.php:22
2316
+ msgid "Pages"
2317
+ msgstr "ページ"
2318
 
2319
+ #: views/admin_post_list.php:23
2320
+ msgid "Custom Posts"
2321
+ msgstr "カスタム投稿"
2322
+
2323
+ #: views/admin_tools_settings.php:14
2324
+ msgid "The required pages have been re-created."
2325
+ msgstr "必要なページが再度作成されました。"
2326
+
2327
+ #: views/admin_tools_settings.php:21
2328
+ msgid "Generate a Registration Completion link"
2329
+ msgstr "登録完了リンクを生成する"
2330
+
2331
+ #: views/admin_tools_settings.php:24
2332
+ msgid ""
2333
+ "You can manually generate a registration completion link here and give it to "
2334
+ "your customer if they have missed the email that was automatically sent out "
2335
+ "to them after the payment."
2336
+ msgstr ""
2337
+ "支払い後に自動的に送信されたメールが紛失した場合、ここで手動で登録完了リンク"
2338
+ "を生成し、会員に渡すことができます。"
2339
+
2340
+ #: views/admin_tools_settings.php:29
2341
+ msgid "Generate Registration Completion Link"
2342
+ msgstr "登録完了リンクを生成する"
2343
+
2344
+ #: views/admin_tools_settings.php:30
2345
+ msgid "For a Particular Member ID"
2346
+ msgstr "特定の会員IDに対して"
2347
+
2348
+ #: views/admin_tools_settings.php:32
2349
+ msgid "OR"
2350
+ msgstr "または"
2351
+
2352
+ #: views/admin_tools_settings.php:33
2353
+ msgid "For All Incomplete Registrations"
2354
+ msgstr "すべての未完了な登録に対して"
2355
+
2356
+ #: views/admin_tools_settings.php:38
2357
+ msgid "Send Registration Reminder Email Too"
2358
+ msgstr "登録リマインダーメールを送信する"
2359
+
2360
+ #: views/admin_tools_settings.php:44
2361
+ msgid "Submit"
2362
+ msgstr "送信"
2363
+
2364
+ #: views/admin_tools_settings.php:53
2365
+ msgid ""
2366
+ "Link(s) generated successfully. The following link(s) can be used to "
2367
+ "complete the registration."
2368
+ msgstr ""
2369
+ "リンクが生成されました。登録を完了するために、以下のリンクをお使いいただけま"
2370
+ "す。"
2371
+
2372
+ #: views/admin_tools_settings.php:55
2373
+ msgid "Registration completion links will appear below"
2374
+ msgstr "登録完了リンクが下に表示されます"
2375
+
2376
+ #: views/admin_tools_settings.php:65
2377
+ msgid "A prompt to complete registration email was also sent."
2378
+ msgstr "登録完了を促すメールも送信されました。"
2379
+
2380
+ #: views/admin_tools_settings.php:78 views/admin_tools_settings.php:88
2381
+ msgid "Re-create the Required Pages"
2382
+ msgstr "必要なページを再度作成"
2383
+
2384
+ #: views/admin_tools_settings.php:81
2385
+ msgid ""
2386
+ "If you have accidentally deleted the required pages that this plugin creates "
2387
+ "at install time, you can use this option to re-create them."
2388
+ msgstr ""
2389
+ "プラグインのインストール時に自動作成された必要なページを誤って削除してしまっ"
2390
+ "た場合、このオプションを使って再度作成できます。"
2391
+
2392
+ #: views/admin_tools_settings.php:82
2393
+ msgid " has full explanation."
2394
+ msgstr " 詳細を説明しています。"
2395
+
2396
+ #: views/edit.php:32 views/edit.php:36
2397
+ msgid "Leave empty to keep the current password"
2398
+ msgstr "同じパスワードを利用する場合は空欄にする"
2399
+
2400
+ #: views/edit.php:71
2401
+ msgid "Company Name"
2402
+ msgstr "会社名"
2403
+
2404
+ #: views/forgot_password.php:12
2405
+ msgid "Reset Password"
2406
+ msgstr "パスワードリセット"
2407
+
2408
+ #: views/loggedin.php:6
2409
+ msgid "Logged in as"
2410
+ msgstr "ログイン中のアカウント"
2411
+
2412
+ #: views/loggedin.php:14
2413
+ msgid "Membership"
2414
+ msgstr "メンバーシップ"
2415
+
2416
+ #: views/loggedin.php:18
2417
+ msgid "Account Expiry"
2418
+ msgstr "アカウントの有効期限"
2419
+
2420
+ #: views/loggedin.php:26
2421
+ msgid "Edit Profile"
2422
+ msgstr "プロフィールの編集"
2423
+
2424
+ #: views/login.php:11
2425
+ msgid "Username or Email"
2426
+ msgstr "ユーザー名またはメールアドレス"
2427
+
2428
+ #: views/login.php:24
2429
+ msgid "Remember Me"
2430
+ msgstr "ログイン情報を保存"
2431
+
2432
+ #: views/login.php:33
2433
+ msgid "Forgot Password?"
2434
+ msgstr "パスワードをお忘れですか?"
2435
+
2436
+ #: views/payments/admin_all_payment_transactions.php:6
2437
+ msgid "All the payments/transactions of your members are recorded here."
2438
+ msgstr "会員のすべての支払い/トランザクションがここに記録されます。"
2439
+
2440
+ #: views/payments/admin_all_payment_transactions.php:12
2441
+ msgid "Search for a transaction by using email or name"
2442
+ msgstr "メールまたは名前を使ってトランザクションを検索する"
2443
+
2444
+ #: views/payments/admin_create_payment_buttons.php:15
2445
+ msgid ""
2446
+ "You can create new payment button for your memberships using this interface."
2447
+ msgstr ""
2448
+ "この画面からメンバーシップの新しい支払いボタンを作成することができます。"
2449
+
2450
+ #: views/payments/admin_create_payment_buttons.php:23
2451
+ msgid "Select Payment Button Type"
2452
+ msgstr "支払ボタンタイプを選択"
2453
+
2454
+ #: views/payments/admin_create_payment_buttons.php:26
2455
+ msgid "PayPal Buy Now"
2456
+ msgstr "PayPal今すぐ購入"
2457
 
2458
+ #: views/payments/admin_create_payment_buttons.php:28
2459
+ msgid "PayPal Subscription"
2460
+ msgstr "PayPal 定期購入"
2461
 
2462
+ #: views/payments/admin_create_payment_buttons.php:30
2463
+ msgid "PayPal Smart Checkout"
2464
+ msgstr "PayPalスマートペイメント"
2465
 
2466
+ #: views/payments/admin_create_payment_buttons.php:32
2467
+ msgid "Stripe Buy Now"
2468
+ msgstr "Stripe今すぐ購入"
 
2469
 
2470
+ #: views/payments/admin_create_payment_buttons.php:34
2471
+ msgid "Stripe Subscription"
2472
+ msgstr "Stripe定期購入"
2473
 
2474
+ #: views/payments/admin_create_payment_buttons.php:36
2475
+ msgid "Braintree Buy Now"
2476
+ msgstr "Braintree今すぐ購入"
 
2477
 
2478
+ #: views/payments/admin_create_payment_buttons.php:43
2479
+ msgid "Next"
2480
+ msgstr ""
2481
 
2482
+ #: views/payments/admin_edit_payment_buttons.php:15
2483
+ msgid "You can edit a payment button using this interface."
2484
+ msgstr "この画面より支払ボタンを編集できます。"
2485
 
2486
+ #: views/payments/admin_payment_buttons.php:6
2487
+ msgid ""
2488
+ "All the membership buttons that you created in the plugin are displayed here."
2489
+ msgstr "このプラグインで作成した全ての入会用ボタンはこちらに表示されます。"
2490
 
2491
+ #: views/payments/admin_payment_settings.php:21
2492
+ msgid "Error! The membership level ID ("
2493
+ msgstr "エラー!会員レベルID("
2494
 
2495
+ #: views/payments/admin_payment_settings.php:28
2496
+ msgid ""
2497
+ "You can create membership payment buttons from the payments menu of this "
2498
+ "plugin (useful if you want to offer paid membership on the site)."
2499
+ msgstr ""
2500
+ "このプラグインの支払いメニューから、会費支払いボタンを作成できます(サイト上"
2501
+ "で有料会員への入会を募集している場合に便利)。"
2502
 
2503
+ #: views/payments/admin_payment_settings.php:33
2504
+ msgid "PayPal Integration Settings"
2505
+ msgstr "PayPal の統合設定"
2506
 
2507
+ #: views/payments/admin_payment_settings.php:36
2508
+ msgid "Generate the \"Advanced Variables\" Code for your PayPal button"
2509
+ msgstr "PayPal ボタンの「詳細変数」コードを生成する"
2510
 
2511
+ #: views/payments/admin_payment_settings.php:39
2512
+ msgid "Enter the Membership Level ID"
2513
+ msgstr "会員レベルID を入力してください"
 
 
 
2514
 
2515
+ #: views/payments/admin_payment_settings.php:41
2516
+ msgid "Generate Code"
2517
+ msgstr "コードを生成する"
 
 
 
2518
 
2519
+ #: views/payments/payment-gateway/admin_braintree_buy_now_button.php:22
2520
+ msgid "Braintree Buy Now Button Configuration"
2521
+ msgstr "Braintree今すぐ購入ボタン設定"
2522
 
2523
+ #: views/payments/payment-gateway/admin_braintree_buy_now_button.php:34
2524
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:213
2525
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:33
2526
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:301
2527
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:259
2528
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:83
2529
+ msgid "Button ID"
2530
+ msgstr "ボタン ID"
2531
 
2532
+ #: views/payments/payment-gateway/admin_braintree_buy_now_button.php:42
2533
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:26
2534
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:221
2535
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:41
2536
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:27
2537
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:309
2538
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:39
2539
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:266
2540
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:91
2541
+ msgid "Button Title"
2542
+ msgstr "ボタンタイトル"
2543
 
2544
+ #: views/payments/payment-gateway/admin_braintree_buy_now_button.php:60
2545
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:44
2546
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:239
2547
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:59
2548
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:57
2549
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:282
2550
+ msgid "Payment Amount"
2551
+ msgstr "支払金額"
2552
 
2553
+ #: views/payments/payment-gateway/admin_braintree_buy_now_button.php:68
2554
+ msgid ""
2555
+ "Braintree API key and account details. You can get this from your Braintree "
2556
+ "account."
2557
+ msgstr ""
2558
+ "Braintree APIキーとアカウント詳細。この情報はBraintreeアカウントから入手でき"
2559
+ "ます。"
2560
+
2561
+ #: views/payments/payment-gateway/admin_braintree_buy_now_button.php:72
2562
+ msgid "Merchant ID"
2563
+ msgstr "販売者ID"
2564
+
2565
+ #: views/payments/payment-gateway/admin_braintree_buy_now_button.php:80
2566
+ msgid "Public Key"
2567
+ msgstr "公開鍵"
2568
+
2569
+ #: views/payments/payment-gateway/admin_braintree_buy_now_button.php:87
2570
+ msgid "Private Key"
2571
+ msgstr "秘密鍵"
2572
+
2573
+ #: views/payments/payment-gateway/admin_braintree_buy_now_button.php:95
2574
+ msgid "Merchant Account ID"
2575
+ msgstr "販売者アカウントID"
2576
+
2577
+ #: views/payments/payment-gateway/admin_braintree_buy_now_button.php:113
2578
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:137
2579
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:361
2580
+ msgid "The following details are optional."
2581
+ msgstr "次の詳細は任意です。"
2582
+
2583
+ #: views/payments/payment-gateway/admin_braintree_buy_now_button.php:117
2584
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:92
2585
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:287
2586
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:204
2587
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:172
2588
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:456
2589
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:149
2590
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:373
2591
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:191
2592
+ msgid "Return URL"
2593
+ msgstr "リターン URL"
2594
 
2595
+ #: views/payments/payment-gateway/admin_braintree_buy_now_button.php:127
2596
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:126
2597
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:321
2598
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:214
2599
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:200
2600
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:484
2601
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:159
2602
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:383
2603
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:212
2604
+ msgid "Save Payment Data"
2605
+ msgstr "支払データ保存"
2606
 
2607
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:16
2608
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:204
2609
+ msgid "PayPal Buy Now Button Configuration"
2610
+ msgstr "PayPal 今すぐ購入ボタン設定"
2611
+
2612
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:52
2613
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:247
2614
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:67
2615
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:45
2616
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:327
2617
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:65
2618
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:289
2619
+ msgid "Payment Currency"
2620
+ msgstr "支払通貨"
2621
 
2622
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:100
2623
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:295
2624
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:85
2625
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:367
2626
+ msgid "PayPal Email"
2627
+ msgstr "PayPal メール"
2628
 
2629
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:108
2630
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:303
2631
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:180
2632
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:464
2633
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:199
2634
+ msgid "Button Image URL"
2635
+ msgstr "ボタン画像 URL"
2636
 
2637
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:116
2638
+ #: views/payments/payment-gateway/admin_paypal_buy_now_button.php:311
2639
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:188
2640
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:472
2641
+ msgid "Custom Checkout Page Logo Image"
2642
+ msgstr "決済ページのカスタムロゴ画像"
2643
 
2644
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:21
2645
+ msgid "PayPal Smart Checkout Button Configuration"
2646
+ msgstr "PayPal スマートペイメントボタン設定"
2647
 
2648
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:107
2649
+ msgid ""
2650
+ "PayPal Smart Checkout API Credentials (you can get this from your PayPal "
2651
+ "account)"
2652
+ msgstr ""
2653
+ "PayPalスマートペイメントAPI認証情報(あなたのPayPalアカウントから取得できま"
2654
+ "す)"
2655
 
2656
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:111
2657
+ msgid "Live Client ID"
2658
+ msgstr "本番用クライアントID"
2659
 
2660
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:119
2661
+ msgid "Live Secret"
2662
+ msgstr "本番用秘密"
2663
 
2664
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:127
2665
+ msgid "Sandbox Client ID"
2666
+ msgstr "テスト用クライアントID"
2667
 
2668
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:135
2669
+ msgid "Sandbox Secret"
2670
+ msgstr "テスト用秘密"
2671
 
2672
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:143
2673
+ msgid "Button Appearance Settings"
2674
+ msgstr "ボタン外観設定"
2675
 
2676
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:147
2677
+ msgid "Size"
2678
+ msgstr "サイズ"
2679
 
2680
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:150
2681
+ msgid "Medium"
2682
+ msgstr ""
2683
 
2684
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:151
2685
+ msgid "Large"
2686
+ msgstr ""
2687
 
2688
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:152
2689
+ msgid "Repsonsive"
2690
+ msgstr "レスポンシブ"
2691
 
2692
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:154
2693
+ msgid "Select button size."
2694
+ msgstr "ボタンサイズを選択。"
2695
 
2696
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:158
2697
+ msgid "Color"
2698
+ msgstr ""
2699
 
2700
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:161
2701
+ msgid "Gold"
2702
+ msgstr "ゴールド"
 
 
2703
 
2704
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:162
2705
+ msgid "Blue"
2706
+ msgstr ""
2707
 
2708
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:163
2709
+ msgid "Silver"
2710
+ msgstr "シルバー"
 
2711
 
2712
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:164
2713
+ msgid "Black"
2714
+ msgstr ""
2715
 
2716
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:166
2717
+ msgid "Select button color."
2718
+ msgstr "ボタンの色を選択。"
 
2719
 
2720
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:170
2721
+ msgid "Shape"
2722
+ msgstr "形状"
 
2723
 
2724
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:172
2725
+ msgid "Rectangular"
2726
+ msgstr "長方形"
 
2727
 
2728
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:173
2729
+ msgid "Pill"
2730
+ msgstr "ピル形状"
 
2731
 
2732
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:174
2733
+ msgid "Select button shape."
2734
+ msgstr "ボタンの形を選択。"
2735
 
2736
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:178
2737
+ msgid "Layout"
2738
+ msgstr "配置"
2739
 
2740
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:180
2741
+ msgid "Vertical"
2742
+ msgstr ""
 
2743
 
2744
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:181
2745
+ msgid "Horizontal"
2746
+ msgstr ""
 
2747
 
2748
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:182
2749
+ msgid "Select button layout."
2750
+ msgstr "ボタンのレイアウトを選択。"
 
2751
 
2752
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:187
2753
+ msgid "Additional Settings"
2754
+ msgstr "追加設定"
 
2755
 
2756
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:191
2757
+ msgid "Payment Methods"
2758
+ msgstr "支払い方法"
2759
 
2760
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:193
2761
+ msgid "PayPal Credit"
2762
+ msgstr "PayPalクレジット"
 
 
 
 
2763
 
2764
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:194
2765
+ msgid "ELV"
2766
+ msgstr "ELV"
2767
 
2768
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:195
2769
+ msgid ""
2770
+ "Select payment methods that could be used by customers. Note that payment "
2771
+ "with cards is always enabled."
2772
+ msgstr ""
2773
+ "お客様にご利用いただける支払い方法を選択してください。なお、カード払いは常に"
2774
+ "有効になっています。"
2775
 
2776
+ #: views/payments/payment-gateway/admin_paypal_smart_checkout_button.php:200
2777
+ msgid "The following details are optional"
2778
+ msgstr "次の詳細は任意"
 
2779
 
2780
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:18
2781
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:295
2782
+ msgid "PayPal Subscription Button Configuration"
2783
+ msgstr "PayPal定期購入ボタンの設定"
 
 
2784
 
2785
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:93
2786
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:375
2787
+ msgid "Billing Amount Each Cycle"
2788
+ msgstr "各サイクルの請求額"
2789
 
2790
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:101
2791
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:383
2792
+ msgid "Billing Cycle"
2793
+ msgstr "請求サイクル"
2794
 
2795
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:114
2796
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:396
2797
+ msgid "Billing Cycle Count"
2798
+ msgstr "請求サイクルカウント"
2799
 
2800
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:122
2801
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:404
2802
+ msgid "Re-attempt on Failure"
2803
+ msgstr "失敗時の再試行"
 
 
2804
 
2805
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:135
2806
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:419
2807
+ msgid ""
2808
+ "Trial Billing Details (Leave empty if you are not offering a trial period)"
2809
+ msgstr ""
2810
+ "トライアル請求詳細(もしトライアル期間を設定していなければ空欄にすること)"
2811
 
2812
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:141
2813
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:425
2814
+ msgid "Trial Billing Amount"
2815
+ msgstr "トライアル請求金額"
 
2816
 
2817
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:149
2818
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:433
2819
+ msgid "Trial Billing Period"
2820
+ msgstr "トライアル請求期間"
2821
 
2822
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:166
2823
+ #: views/payments/payment-gateway/admin_paypal_subscription_button.php:450
2824
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:177
2825
+ msgid "Optional Details"
2826
+ msgstr "設定の詳細"
2827
 
2828
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:29
2829
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:250
2830
+ msgid "Stripe Buy Now Button Configuration"
2831
+ msgstr "Stripe今すぐ購入ボタン設定"
2832
+
2833
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:104
2834
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:328
2835
+ msgid "Stripe API keys. You can get this from your Stripe account."
2836
+ msgstr "Stripe API鍵。あなたのStripeアカウントから取得できます。"
2837
+
2838
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:108
2839
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:332
2840
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:131
2841
+ msgid "Test Publishable Key"
2842
+ msgstr "テスト用公開鍵"
2843
+
2844
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:115
2845
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:339
2846
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:139
2847
+ msgid "Test Secret Key"
2848
+ msgstr "テスト用秘密鍵"
2849
+
2850
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:122
2851
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:346
2852
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:147
2853
+ msgid "Live Publishable Key"
2854
+ msgstr "本番用公開鍵"
2855
+
2856
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:129
2857
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:353
2858
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:155
2859
+ msgid "Live Secret Key"
2860
+ msgstr "本番用秘密鍵"
2861
+
2862
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:141
2863
+ #: views/payments/payment-gateway/admin_stripe_buy_now_button.php:365
2864
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:183
2865
+ msgid "Collect Customer Address"
2866
+ msgstr "正しいお客様住所"
2867
+
2868
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:75
2869
+ msgid "Stripe Subscription Button Configuration"
2870
+ msgstr "Stripe定期購入ボタン設定"
2871
+
2872
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:109
2873
+ msgid "Stripe Plan ID"
2874
+ msgstr "StripeプランID"
2875
+
2876
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:125
2877
+ msgid "Stripe API Settings"
2878
+ msgstr "Stripe API設定"
2879
+
2880
+ #: views/payments/payment-gateway/admin_stripe_subscription_button.php:163
2881
+ msgid "Webook Endpoint URL"
2882
+ msgstr "WebhookエンドポイントURL"
2883
+
2884
+ #: views/payments/payment-gateway/braintree_button_shortcode_view.php:20
2885
+ #: views/payments/payment-gateway/paypal_button_shortcode_view.php:91
2886
+ #: views/payments/payment-gateway/paypal_button_shortcode_view.php:93
2887
+ #: views/payments/payment-gateway/paypal_smart_checkout_button_shortcode_view.php:15
2888
+ #: views/payments/payment-gateway/stripe_button_shortcode_view.php:20
2889
+ #: views/payments/payment-gateway/stripe_button_shortcode_view.php:150
2890
+ msgid "Buy Now"
2891
+ msgstr "今すぐ購入"
2892
 
2893
+ #: views/payments/payment-gateway/paypal_button_shortcode_view.php:226
2894
+ #: views/payments/payment-gateway/paypal_button_shortcode_view.php:228
2895
+ msgid "Subscribe Now"
2896
+ msgstr "今すぐ定期購入する"
2897
 
2898
+ #: views/payments/payment-gateway/paypal_smart_checkout_button_shortcode_view.php:137
2899
+ msgid "Error occured during PayPal Smart Checkout process."
2900
+ msgstr "PayPalスマートペイメント処理中にエラー発生。"
2901
 
2902
+ #: views/payments/payment-gateway/paypal_smart_checkout_button_shortcode_view.php:165
2903
+ msgid "HTTP error occured during payment process:"
2904
+ msgstr "支払い処理中にHTTPエラー発生:"
2905
 
2906
+ #: Translation strings from addons === Form builder addon
2907
+ msgid "Type password here"
2908
+ msgstr "ここにパスワードを入力してください"
2909
 
2910
+ msgid "Retype password here"
2911
+ msgstr "ここにパスワードを再入力してください"
 
2912
 
2913
+ msgid "Registration is complete. You can now log into the site."
2914
+ msgstr "登録が完了しました。サイトに今すぐログインできます。"
 
2915
 
2916
+ msgid " Field has invalid character"
2917
+ msgstr " フィールドに無効な文字が含まれています"
 
2918
 
2919
+ msgid " Password does not match"
2920
+ msgstr " パスワードが一致していません"
 
2921
 
2922
+ msgid "Already taken."
2923
+ msgstr "すでに使われています。"
 
2924
 
2925
+ msgid "Street Address"
2926
+ msgstr "住所・番地"
 
2927
 
2928
+ msgid "Apt, Suite, Bldg. (optional)"
2929
+ msgstr "アパート・スイート・建物(任意)"
 
2930
 
2931
+ msgid "State / Province / Region"
2932
+ msgstr "都道府県"
 
2933
 
2934
+ msgid "Postal / Zip Code"
2935
+ msgstr "郵便番号"
 
2936
 
2937
+ msgid ""
2938
+ "Check this box to delete the image. The image will be deleted when you save "
2939
+ "the profile."
2940
+ msgstr ""
2941
+ "画像を削除するにはこのボックスをチェック。プロフィールを保存すると画像は削除"
2942
+ "されます。"
2943
 
2944
+ msgid "You will need to re-login since you changed your password."
2945
+ msgstr "パスワードを変更したので、再度ログインが必要です。"
 
2946
 
2947
+ msgid ""
2948
+ "Please enter any two digits with <strong>no</strong> spaces (Example: 12)"
2949
+ msgstr "2つの数字をスペース<strong>なし</strong>で入力してください(例:12)"
2950
 
2951
+ msgid "Verification"
2952
+ msgstr "認証"
 
2953
 
2954
+ msgid "Please enter any two digits with no spaces (Example: 12)*"
2955
+ msgstr "2つの数字をスペースなしで入力してください(例:12)*"
 
 
 
 
2956
 
2957
+ msgid "Username can only contain: letters, numbers and .-*@"
2958
+ msgstr "ユーザー名に使える文字:英文字、番号、 .-*@"
 
 
 
 
2959
 
2960
+ msgid "Allowed characters are: letters, numbers and .-_*@"
2961
+ msgstr "許可されている文字:英文字、番号、 .-*@"
 
2962
 
2963
+ #: === Partial protection addon strings
2964
+ msgid "You do not have permission to view this content."
2965
+ msgstr "このコンテンツを閲覧する権限がありません。"
2966
 
2967
+ msgid "Your membership level does not have permission to view this content."
2968
+ msgstr "あなたの会員レベルでは、このコンテンツを閲覧する権限がありません。"
 
2969
 
2970
+ msgid "This content is for members only."
2971
+ msgstr "このコンテンツは会員専用です。"
 
2972
 
2973
+ msgid "Please check at least one."
2974
+ msgstr "1つ以上チェックしてください。"
 
2975
 
2976
+ #: === Member Directory Listing addon strings swpm-member-directory-admin.php:9
2977
+ msgid "Member Directory"
2978
+ msgstr "会員ディレクトリ"
 
2979
 
2980
+ #: includes/swpm_mda_show_profile.php:26
2981
+ msgid "Member ID"
2982
+ msgstr "会員ID"
2983
 
2984
+ #: includes/swpm_mda_show_profile.php:30
2985
+ msgid "Level"
2986
+ msgstr "レベル"
2987
 
2988
+ #: includes/swpm_mda_show_profile.php:32
2989
+ msgid "Address"
2990
+ msgstr "アドレス"
2991
 
2992
+ #: views/template-1.php:52 views/template-2.php:53
2993
+ msgid "Search..."
2994
+ msgstr "検索…"
2995
 
2996
+ #: views/template-1.php:60 views/template-2.php:62
2997
+ msgid "Clear Search"
2998
+ msgstr "検索リセット"
2999
 
3000
+ # === Misc Shortcodes Addon ===
3001
+ msgid "You must be logged in to upgrade a membership."
3002
+ msgstr "会員レベルのアップグレードにはログインが必要です。"
 
3003
 
3004
+ msgid "Membership level has been updated."
3005
+ msgstr "会員レベルが更新されました。"
 
 
 
 
 
 
 
 
 
 
 
3006
 
3007
+ msgid "Already a member of this level."
3008
+ msgstr "既にこの会員レベルです。"
 
3009
 
3010
+ #~ msgid "smp7, wp.insider"
3011
+ #~ msgstr "smp7, wp.insider"
 
 
 
3012
 
3013
+ #~ msgid ""
3014
+ #~ "A flexible, well-supported, and easy-to-use WordPress membership plugin "
3015
+ #~ "for offering free and premium content from your WordPress site."
3016
+ #~ msgstr ""
3017
+ #~ "WordPress サイトから無料で提供されている、柔軟で、よくサポートされ、使いや"
3018
+ #~ "すい WordPress メンバーシッププラグイン。"
3019
 
3020
+ #~ msgid "https://simple-membership-plugin.com/"
3021
+ #~ msgstr "https://simple-membership-plugin.com/"
 
 
 
3022
 
3023
+ #~ msgid "Simple WordPress Membership"
3024
+ #~ msgstr "Simple WordPress Membership"
 
 
 
3025
 
3026
+ #~ msgid "Forgot Password"
3027
+ #~ msgstr "パスワードを忘れた"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3028
 
3029
+ #~ msgid "search"
3030
+ #~ msgstr "検索"
 
3031
 
3032
+ #~ msgid "Edit User "
3033
+ #~ msgstr "ユーザーの編集 "
 
3034
 
3035
+ #~ msgid "Simple WP Membership::Categories"
3036
+ #~ msgstr "Simple WP Membership::カテゴリー"
 
3037
 
3038
+ #~ msgid "User name"
3039
+ #~ msgstr "ユーザー名"
 
 
 
 
3040
 
3041
+ #~ msgid "Go to the last page"
3042
+ #~ msgstr "最後のページに移動"
 
 
 
 
3043
 
3044
+ #~ msgctxt "paging"
3045
+ #~ msgid "%1$s of %2$s"
3046
+ #~ msgstr "%2$s中%1$s"
 
3047
 
3048
+ #~ msgid "Current page"
3049
+ #~ msgstr "現在のページ"
 
3050
 
3051
+ #~ msgid "Go to the previous page"
3052
+ #~ msgstr "前のページに戻る"
 
 
 
3053
 
3054
+ #~ msgid "Go to the first page"
3055
+ #~ msgstr "最初のページに戻る"
 
 
 
 
 
3056
 
3057
+ #~ msgid "1 item"
3058
+ #~ msgid_plural "%s items"
3059
+ #~ msgstr[0] "%s 件"
3060
 
3061
+ #~ msgid "%s pending"
3062
+ #~ msgstr "%s 保留中"
 
3063
 
3064
+ #~ msgid "%1$s %2$d"
3065
+ #~ msgstr "%1$s %2$d"
 
3066
 
3067
+ #~ msgid "All dates"
3068
+ #~ msgstr "すべての日付"
 
3069
 
3070
+ #~ msgid "Filter by date"
3071
+ #~ msgstr "日付によるフィルター"
 
3072
 
3073
+ #~ msgid "Apply"
3074
+ #~ msgstr "適用"
 
3075
 
3076
+ #~ msgid "Excerpt View"
3077
+ #~ msgstr "抜粋を表示"
 
3078
 
3079
+ #~ msgid "List View"
3080
+ #~ msgstr "リストを表示"
 
3081
 
3082
+ #~ msgid "Send Notification To Admin"
3083
+ #~ msgstr "管理者に知らせる"
 
3084
 
3085
+ #~ msgid "Updated Successfully."
3086
+ #~ msgstr "更新されました。"
 
3087
 
3088
+ #~ msgid "No user not found with that email address."
3089
+ #~ msgstr "このメールアドレスで登録されているユーザーが見つかりません。"
 
3090
 
3091
+ #~ msgid "Updated! "
3092
+ #~ msgstr "更新しました。"
 
3093
 
3094
+ #~ msgid "Name"
3095
+ #~ msgstr "名称"
 
3096
 
3097
+ #~ msgid "Sorry! Something went wrong"
3098
+ #~ msgstr "間違いがあります。"
 
3099
 
3100
+ #~ msgid "Registration Successful."
3101
+ #~ msgstr "登録が完了しました。"
 
languages/simple-membership-zh_HK.mo ADDED
Binary file
languages/simple-membership-zh_HK.po ADDED
@@ -0,0 +1,689 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Simple WordPress Membership\n"
4
+ "POT-Creation-Date: 2014-07-30 17:30+0800\n"
5
+ "PO-Revision-Date: 2014-07-30 23:09+0800\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: \n"
8
+ "Language: zh_Hans\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.6.7\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Poedit-KeywordsList: __;_e\n"
16
+ "Plural-Forms: nplurals=1; plural=0;\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+
19
+ #: classes/class.bAdminRegistration.php:48
20
+ #: classes/class.bFrontRegistration.php:61
21
+ msgid "Registration Successful."
22
+ msgstr "注册成功"
23
+
24
+ #: classes/class.bAdminRegistration.php:53
25
+ #: classes/class.bAdminRegistration.php:72
26
+ #: classes/class.bMembershipLevel.php:36 classes/class.bMembershipLevel.php:54
27
+ msgid "Please correct the following:"
28
+ msgstr "请更改以下信息"
29
+
30
+ #: classes/class.bAjax.php:16 classes/class.bAjax.php:28
31
+ msgid "Aready taken"
32
+ msgstr "已被占用"
33
+
34
+ #: classes/class.bAjax.php:29
35
+ msgid "Available"
36
+ msgstr "可以使用"
37
+
38
+ #: classes/class.bAuth.php:47 classes/class.bFrontRegistration.php:176
39
+ msgid "User Not Found."
40
+ msgstr "找不到用户"
41
+
42
+ #: classes/class.bAuth.php:54
43
+ msgid "Password Empty or Invalid."
44
+ msgstr "密码空或者无效"
45
+
46
+ #: classes/class.bAuth.php:78
47
+ msgid "Account is inactive."
48
+ msgstr "账户未激活"
49
+
50
+ #: classes/class.bAuth.php:88
51
+ msgid "You are logged in as:"
52
+ msgstr "您已使用以下身份登陆"
53
+
54
+ #: classes/class.bAuth.php:127
55
+ msgid "Logged Out Successfully."
56
+ msgstr "成功退出登陆"
57
+
58
+ #: classes/class.bAuth.php:169
59
+ msgid "Session Expired."
60
+ msgstr "登陆超时"
61
+
62
+ #: classes/class.bAuth.php:178
63
+ msgid "Invalid User Name"
64
+ msgstr "无效的用户名"
65
+
66
+ #: classes/class.bAuth.php:186
67
+ msgid "Bad Cookie Hash"
68
+ msgstr "坏的Cookie"
69
+
70
+ #: classes/class.bForm.php:26
71
+ msgid ""
72
+ "Wordpress account exists with given user name. But given email doesn't match."
73
+ msgstr "用户名正确,但邮箱错误"
74
+
75
+ #: classes/class.bForm.php:31
76
+ msgid ""
77
+ "Wordpress account exists with given email. But given user name doesn't match."
78
+ msgstr "邮箱正确,但用户名错误"
79
+
80
+ #: classes/class.bForm.php:40
81
+ msgid "User name is required"
82
+ msgstr "请输入用户名"
83
+
84
+ #: classes/class.bForm.php:49
85
+ msgid "User name already exists."
86
+ msgstr "用户名已经存在"
87
+
88
+ #: classes/class.bForm.php:72
89
+ msgid "Password is required"
90
+ msgstr "请输入密码"
91
+
92
+ #: classes/class.bForm.php:79
93
+ msgid "Password mismatch"
94
+ msgstr "密码不符"
95
+
96
+ #: classes/class.bForm.php:95
97
+ msgid "Email is required"
98
+ msgstr "请输入邮箱地址"
99
+
100
+ #: classes/class.bForm.php:99
101
+ msgid "Email is invalid"
102
+ msgstr "邮箱无效"
103
+
104
+ #: classes/class.bForm.php:112
105
+ msgid "Email is already used."
106
+ msgstr "邮箱已经存在"
107
+
108
+ #: classes/class.bForm.php:128
109
+ msgid "Phone number is invalid"
110
+ msgstr "电话号码无效"
111
+
112
+ #: classes/class.bForm.php:174
113
+ msgid "Member since field is invalid"
114
+ msgstr "号码段无效"
115
+
116
+ #: classes/class.bForm.php:185
117
+ msgid "Subscription starts field is invalid"
118
+ msgstr "开始时间字段无效"
119
+
120
+ #: classes/class.bForm.php:195
121
+ msgid "Gender field is invalid"
122
+ msgstr "性别填写无效"
123
+
124
+ #: classes/class.bForm.php:206
125
+ msgid "Account state field is invalid"
126
+ msgstr "账户描述无效"
127
+
128
+ #: classes/class.bFrontRegistration.php:61
129
+ msgid "Please"
130
+ msgstr "请"
131
+
132
+ #: classes/class.bFrontRegistration.php:61 views/login.php:21
133
+ msgid "Login"
134
+ msgstr "登陆"
135
+
136
+ #: classes/class.bFrontRegistration.php:76
137
+ #: classes/class.bFrontRegistration.php:155
138
+ msgid "Please correct the following"
139
+ msgstr "请修改以下信息"
140
+
141
+ #: classes/class.bFrontRegistration.php:89
142
+ msgid "Membership Level Couldn't be found."
143
+ msgstr "会员等级不存在"
144
+
145
+ #: classes/class.bFrontRegistration.php:165
146
+ msgid "Email Address Not Valid."
147
+ msgstr "Email地址无效"
148
+
149
+ #: classes/class.bFrontRegistration.php:196
150
+ msgid "New password has been sent to your email address."
151
+ msgstr "新的密码已经发送到您的邮箱"
152
+
153
+ #: classes/class.bLevelForm.php:31
154
+ msgid "Subscriptoin duration must be > 0."
155
+ msgstr "过程必须大于0"
156
+
157
+ #: classes/class.bMembers.php:7
158
+ msgid "Member"
159
+ msgstr "会员"
160
+
161
+ #: classes/class.bMembers.php:8 classes/class.simple-wp-membership.php:439
162
+ msgid "Members"
163
+ msgstr "会员"
164
+
165
+ #: classes/class.bMembers.php:16 classes/class.bMembershipLevels.php:16
166
+ msgid "ID"
167
+ msgstr "ID"
168
+
169
+ #: classes/class.bMembers.php:17 views/add.php:5 views/edit.php:4
170
+ #: views/login.php:5
171
+ msgid "User Name"
172
+ msgstr "用户名"
173
+
174
+ #: classes/class.bMembers.php:18 views/add.php:21
175
+ #: views/admin_member_form_common_part.php:2 views/edit.php:20
176
+ msgid "First Name"
177
+ msgstr "名"
178
+
179
+ #: classes/class.bMembers.php:19 views/add.php:25
180
+ #: views/admin_member_form_common_part.php:6 views/edit.php:24
181
+ msgid "Last Name"
182
+ msgstr "姓"
183
+
184
+ #: classes/class.bMembers.php:20 views/add.php:9 views/edit.php:8
185
+ msgid "Email"
186
+ msgstr "Email"
187
+
188
+ #: classes/class.bMembers.php:21 classes/class.bMembershipLevels.php:8
189
+ #: classes/class.bMembershipLevels.php:17 views/add.php:64
190
+ #: views/admin_member_form_common_part.php:55 views/edit.php:52
191
+ msgid "Membership Level"
192
+ msgstr "会员等级"
193
+
194
+ #: classes/class.bMembers.php:22 views/admin_member_form_common_part.php:78
195
+ msgid "Subscription Starts"
196
+ msgstr "订阅开始于"
197
+
198
+ #: classes/class.bMembers.php:23
199
+ msgid "Account State"
200
+ msgstr "账户描述"
201
+
202
+ #: classes/class.bMembers.php:35 classes/class.bMembershipLevels.php:29
203
+ msgid "Delete"
204
+ msgstr "删除"
205
+
206
+ #: classes/class.bMembers.php:98
207
+ msgid "No Member found."
208
+ msgstr "会员不存在"
209
+
210
+ #: classes/class.bMembershipLevel.php:31
211
+ msgid "Membership Level Creation Successful."
212
+ msgstr "会员等级创建成功"
213
+
214
+ #: classes/class.bMembershipLevel.php:50
215
+ msgid "Updated Successfully."
216
+ msgstr "更新成功"
217
+
218
+ #: classes/class.bMembershipLevels.php:9
219
+ #: classes/class.simple-wp-membership.php:441
220
+ msgid "Membership Levels"
221
+ msgstr "会员等级"
222
+
223
+ #: classes/class.bMembershipLevels.php:18
224
+ msgid "Role"
225
+ msgstr "角色"
226
+
227
+ #: classes/class.bMembershipLevels.php:19
228
+ msgid "Subscription Valid For"
229
+ msgstr "订阅有效于"
230
+
231
+ #: classes/class.bSettings.php:28
232
+ msgid "Plugin Documentation"
233
+ msgstr "插件文件"
234
+
235
+ #: classes/class.bSettings.php:30
236
+ msgid "General Settings"
237
+ msgstr "总体设置"
238
+
239
+ #: classes/class.bSettings.php:32
240
+ msgid "Enable Free Membership"
241
+ msgstr "启用免费会员"
242
+
243
+ #: classes/class.bSettings.php:35
244
+ msgid "Enable/disable registration for free membership level"
245
+ msgstr "启用/不启用免费会员注册"
246
+
247
+ #: classes/class.bSettings.php:36
248
+ msgid "Free Membership Level ID"
249
+ msgstr "免费会员等级ID"
250
+
251
+ #: classes/class.bSettings.php:39
252
+ msgid "Assign free membership level ID"
253
+ msgstr "指定免费会员级别ID"
254
+
255
+ #: classes/class.bSettings.php:40
256
+ msgid "Hide Adminbar"
257
+ msgstr "隐藏管理栏"
258
+
259
+ #: classes/class.bSettings.php:43
260
+ msgid ""
261
+ "WordPress shows an admin toolbar to the logged in users of the site. Check "
262
+ "this box if you want to hide that admin toolbar in the fronend of your site."
263
+ msgstr ""
264
+ "WordPress对已经登陆的用户显示管理工具栏,如果你想在网站前端隐藏管理栏请勾选这"
265
+ "里"
266
+
267
+ #: classes/class.bSettings.php:45
268
+ msgid "Pages Settings"
269
+ msgstr "页面设置"
270
+
271
+ #: classes/class.bSettings.php:47
272
+ msgid "Login Page URL"
273
+ msgstr "登陆页面URL"
274
+
275
+ #: classes/class.bSettings.php:51
276
+ msgid "Registration Page URL"
277
+ msgstr "注册页面URL"
278
+
279
+ #: classes/class.bSettings.php:55
280
+ msgid "Join Us Page URL"
281
+ msgstr "加入页面URL"
282
+
283
+ #: classes/class.bSettings.php:59
284
+ msgid "Edit Profile Page URL"
285
+ msgstr "修改会员信息页面URL"
286
+
287
+ #: classes/class.bSettings.php:63
288
+ msgid "Password Reset Page URL"
289
+ msgstr "更改密码页面URL"
290
+
291
+ #: classes/class.bSettings.php:68
292
+ msgid "Test & Debug Settings"
293
+ msgstr "测试与调试设置"
294
+
295
+ #: classes/class.bSettings.php:74
296
+ msgid "Enable Sandbox Testing"
297
+ msgstr "启用沙盒测试"
298
+
299
+ #: classes/class.bSettings.php:77
300
+ msgid "Enable this option if you want to do sandbox payment testing."
301
+ msgstr "如果你要测试付款方式,请启用沙盒"
302
+
303
+ #: classes/class.bSettings.php:90
304
+ msgid "Email Misc. Settings"
305
+ msgstr "电子邮件杂项设置"
306
+
307
+ #: classes/class.bSettings.php:92
308
+ msgid "From Email Address"
309
+ msgstr "电子邮件来路"
310
+
311
+ #: classes/class.bSettings.php:97
312
+ msgid "Email Settings (Prompt to Complete Registration )"
313
+ msgstr "电子邮件设置(快速完成注册)"
314
+
315
+ #: classes/class.bSettings.php:99 classes/class.bSettings.php:110
316
+ #: classes/class.bSettings.php:129
317
+ msgid "Email Subject"
318
+ msgstr "Email标题"
319
+
320
+ #: classes/class.bSettings.php:103 classes/class.bSettings.php:114
321
+ #: classes/class.bSettings.php:133
322
+ msgid "Email Body"
323
+ msgstr "Email内容"
324
+
325
+ #: classes/class.bSettings.php:108
326
+ msgid "Email Settings (Registration Complete)"
327
+ msgstr "Email设置(完成注册)"
328
+
329
+ #: classes/class.bSettings.php:118
330
+ msgid "Send Notification To Admin"
331
+ msgstr "给管理员发送通知"
332
+
333
+ #: classes/class.bSettings.php:122
334
+ msgid "Send Email to Member When Added via Admin Dashboard"
335
+ msgstr "管理员添加用户后给用户发送邮件"
336
+
337
+ #: classes/class.bSettings.php:127
338
+ msgid " Email Settings (Account Upgrade Notification)"
339
+ msgstr "Email设置(账户更新信息通知)"
340
+
341
+ #: classes/class.miscUtils.php:51
342
+ msgid "Registration"
343
+ msgstr "注册"
344
+
345
+ #: classes/class.miscUtils.php:74
346
+ msgid "Member Login"
347
+ msgstr "会员登陆"
348
+
349
+ #: classes/class.miscUtils.php:97
350
+ msgid "Profile"
351
+ msgstr "个人资料"
352
+
353
+ #: classes/class.miscUtils.php:120
354
+ msgid "Password Reset"
355
+ msgstr "更改密码"
356
+
357
+ #: classes/class.simple-wp-membership.php:181
358
+ msgid "Simple WP Membership Protection"
359
+ msgstr "会员保护"
360
+
361
+ #: classes/class.simple-wp-membership.php:194
362
+ msgid "Simple Membership Protection options"
363
+ msgstr "会员保护选项"
364
+
365
+ #: classes/class.simple-wp-membership.php:210
366
+ msgid "Do you want to protect this content?"
367
+ msgstr "你是否需要保护这个内容"
368
+
369
+ #: classes/class.simple-wp-membership.php:215
370
+ msgid "Select the membership level that can access this content:"
371
+ msgstr "选择可以查看该内容的会员等级"
372
+
373
+ #: classes/class.simple-wp-membership.php:347
374
+ msgid "Display SWPM Login."
375
+ msgstr "显示SWPM登陆"
376
+
377
+ #: classes/class.simple-wp-membership.php:349
378
+ msgid "SWPM Login"
379
+ msgstr "SWPM登陆"
380
+
381
+ #: classes/class.simple-wp-membership.php:436
382
+ msgid "WP Membership"
383
+ msgstr "WP会员"
384
+
385
+ #: classes/class.simple-wp-membership.php:443
386
+ msgid "Settings"
387
+ msgstr "设置"
388
+
389
+ #: views/add.php:13 views/admin_member_form_common_part.php:45
390
+ #: views/edit.php:12 views/login.php:11
391
+ msgid "Password"
392
+ msgstr "密码"
393
+
394
+ #: views/add.php:17 views/edit.php:16
395
+ msgid "Repeat Password"
396
+ msgstr "重复密码"
397
+
398
+ #: views/add.php:29 views/admin_member_form_common_part.php:10
399
+ msgid "Gender"
400
+ msgstr "性别"
401
+
402
+ #: views/add.php:36 views/admin_member_form_common_part.php:17
403
+ #: views/edit.php:28
404
+ msgid "Phone"
405
+ msgstr "电话"
406
+
407
+ #: views/add.php:40 views/admin_member_form_common_part.php:21
408
+ #: views/edit.php:32
409
+ msgid "Street"
410
+ msgstr "街道"
411
+
412
+ #: views/add.php:44 views/admin_member_form_common_part.php:25
413
+ #: views/edit.php:36
414
+ msgid "City"
415
+ msgstr "城市"
416
+
417
+ #: views/add.php:48 views/admin_member_form_common_part.php:29
418
+ #: views/edit.php:40
419
+ msgid "State"
420
+ msgstr "省份"
421
+
422
+ #: views/add.php:52 views/admin_member_form_common_part.php:33
423
+ #: views/edit.php:44
424
+ msgid "Zipcode"
425
+ msgstr "邮编"
426
+
427
+ #: views/add.php:56 views/admin_member_form_common_part.php:37
428
+ #: views/edit.php:48
429
+ msgid "Country"
430
+ msgstr "国家"
431
+
432
+ #: views/add.php:60 views/admin_member_form_common_part.php:41
433
+ msgid "Company"
434
+ msgstr "公司"
435
+
436
+ #: views/add.php:71
437
+ msgid "Register"
438
+ msgstr "注册"
439
+
440
+ #: views/admin_add.php:6
441
+ msgid "Add Member"
442
+ msgstr "添加会员"
443
+
444
+ #: views/admin_add.php:7
445
+ msgid "Create a brand new user and add it to this site."
446
+ msgstr "给网站创建一个新用户"
447
+
448
+ #: views/admin_add.php:11
449
+ msgid "User name"
450
+ msgstr "用户名"
451
+
452
+ #: views/admin_add.php:11 views/admin_add.php:15 views/admin_add_level.php:11
453
+ #: views/admin_add_level.php:15 views/admin_add_level.php:19
454
+ #: views/admin_edit.php:9 views/admin_edit.php:13
455
+ #: views/admin_edit_level.php:10 views/admin_edit_level.php:14
456
+ #: views/admin_edit_level.php:18
457
+ msgid "(required)"
458
+ msgstr "必填"
459
+
460
+ #: views/admin_add.php:15 views/admin_edit.php:13
461
+ msgid "E-mail"
462
+ msgstr "E-mail"
463
+
464
+ #: views/admin_add.php:19
465
+ msgid "Add New Member "
466
+ msgstr "添加新会员"
467
+
468
+ #: views/admin_add_level.php:6
469
+ msgid "Create new membership level."
470
+ msgstr "创建新会员等级"
471
+
472
+ #: views/admin_add_level.php:11 views/admin_edit_level.php:10
473
+ msgid "Membership Level Name"
474
+ msgstr "会员等级名"
475
+
476
+ #: views/admin_add_level.php:15 views/admin_edit_level.php:14
477
+ msgid "Default WordPress Role"
478
+ msgstr "默认的WP角色"
479
+
480
+ #: views/admin_add_level.php:19 views/admin_edit_level.php:18
481
+ msgid "Subscription Duration"
482
+ msgstr "有效期"
483
+
484
+ #: views/admin_add_level.php:26 views/admin_edit_level.php:27
485
+ msgid "No Expiry"
486
+ msgstr "不失效"
487
+
488
+ #: views/admin_add_level.php:55
489
+ msgid "Add New Membership Level "
490
+ msgstr "添加新的会员等级"
491
+
492
+ #: views/admin_edit.php:5
493
+ msgid "Edit Member"
494
+ msgstr "修改会员"
495
+
496
+ #: views/admin_edit.php:6
497
+ msgid "Edit existing member details."
498
+ msgstr "修改已存在用户信息"
499
+
500
+ #: views/admin_edit.php:9
501
+ msgid "Username"
502
+ msgstr "用户名"
503
+
504
+ #: views/admin_edit.php:17
505
+ msgid "Edit User "
506
+ msgstr "修改用户"
507
+
508
+ #: views/admin_edit_level.php:5
509
+ msgid "Edit membership level"
510
+ msgstr "修改会员等级"
511
+
512
+ #: views/admin_edit_level.php:6
513
+ msgid "Edit membership level."
514
+ msgstr "修改会员等级"
515
+
516
+ #: views/admin_edit_level.php:54
517
+ msgid "Edit Membership Level "
518
+ msgstr "修改会员等级"
519
+
520
+ #. translators: password input field
521
+ #: views/admin_member_form_common_part.php:45
522
+ msgid "(twice, required)"
523
+ msgstr "2次,必填"
524
+
525
+ #: views/admin_member_form_common_part.php:50
526
+ msgid "Strength indicator"
527
+ msgstr "强度指示器"
528
+
529
+ #: views/admin_member_form_common_part.php:51
530
+ msgid ""
531
+ "Hint: The password should be at least seven characters long. To make it "
532
+ "stronger, use upper and lower case letters, numbers and symbols like ! \" ? "
533
+ "$ % ^ &amp; )."
534
+ msgstr ""
535
+ "密码最少7个字符,为保证密码强度,请使用大小写字母,数字和例如! \" ? $ % ^ "
536
+ "&amp的符号"
537
+
538
+ #: views/admin_member_form_common_part.php:64 views/loggedin.php:7
539
+ #: views/login_widget_logged.php:6
540
+ msgid "Account Status"
541
+ msgstr "账户状态"
542
+
543
+ #: views/admin_member_form_common_part.php:66
544
+ msgid "Active"
545
+ msgstr "激活"
546
+
547
+ #: views/admin_member_form_common_part.php:67
548
+ msgid "Inactive"
549
+ msgstr "未激活"
550
+
551
+ #: views/admin_member_form_common_part.php:68
552
+ msgid "Pending"
553
+ msgstr "待定"
554
+
555
+ #: views/admin_member_form_common_part.php:69
556
+ msgid "Expired"
557
+ msgstr "失效"
558
+
559
+ #: views/admin_member_form_common_part.php:74
560
+ msgid "Member Since"
561
+ msgstr "会员自"
562
+
563
+ #: views/admin_members.php:2
564
+ msgid "Simple WP Membership::Members"
565
+ msgstr "会员等级:会员"
566
+
567
+ #: views/admin_members.php:3 views/admin_members.php:19
568
+ #: views/admin_membership_levels.php:21
569
+ msgid "Add New"
570
+ msgstr "添加新的"
571
+
572
+ #: views/admin_members.php:9 views/admin_membership_levels.php:11
573
+ msgid "search"
574
+ msgstr "搜索"
575
+
576
+ #: views/admin_membership_level_menu.php:2
577
+ msgid "Membership level"
578
+ msgstr "会员等级"
579
+
580
+ #: views/admin_membership_level_menu.php:3
581
+ msgid "Manage Content Production"
582
+ msgstr "管理内容制作"
583
+
584
+ #: views/admin_membership_levels.php:3
585
+ msgid "Simple WP Membership::Membership Levels"
586
+ msgstr "会员:会员等级"
587
+
588
+ #: views/admin_membership_levels.php:4
589
+ msgctxt "Level"
590
+ msgid "Add New"
591
+ msgstr "添加新等级"
592
+
593
+ #: views/admin_membership_manage.php:17
594
+ msgid "Example Content Protection Settings"
595
+ msgstr "内容保护设置例子"
596
+
597
+ #: views/admin_payment_settings.php:2 views/admin_settings.php:2
598
+ #: views/admin_tools_settings.php:2
599
+ msgid "Simple WP Membership::Settings"
600
+ msgstr "会员:设置"
601
+
602
+ #: views/admin_payment_settings.php:33
603
+ msgid "PayPal Integration Settings"
604
+ msgstr "Paypal集成设置"
605
+
606
+ #: views/admin_payment_settings.php:36
607
+ msgid "Generate the \"Advanced Variables\" Code for your PayPal button"
608
+ msgstr "您的PayPal按钮产生高级变量代码"
609
+
610
+ #: views/admin_payment_settings.php:39
611
+ msgid "Enter the Membership Level ID"
612
+ msgstr "输入会员等级ID"
613
+
614
+ #: views/admin_payment_settings.php:41
615
+ msgid "Generate Code"
616
+ msgstr "生成代码"
617
+
618
+ #: views/admin_tools_settings.php:9
619
+ msgid "Generate a Registration Completion link"
620
+ msgstr "生成注册完成链接"
621
+
622
+ #: views/admin_tools_settings.php:12
623
+ msgid ""
624
+ "You can manually generate a registration completion link here and give it to "
625
+ "your customer if they have missed the email that was automatically sent out "
626
+ "to them after the payment."
627
+ msgstr ""
628
+ "如果你的用户在完成付款后没收到自动生成的邮件,那么你可以在这里手动生成注册完"
629
+ "成链接,并发送给你的用户"
630
+
631
+ #: views/admin_tools_settings.php:17
632
+ msgid "Generate Registration Completion Link"
633
+ msgstr "生成注册完成链接"
634
+
635
+ #: views/admin_tools_settings.php:20
636
+ msgid "OR"
637
+ msgstr "或者"
638
+
639
+ #: views/admin_tools_settings.php:21
640
+ msgid "For All Pending Registrations"
641
+ msgstr "对于所有待定的注册"
642
+
643
+ #: views/admin_tools_settings.php:24
644
+ msgid "Registration Completion Links Will Appear Below:"
645
+ msgstr "注册完成链接会出现在:"
646
+
647
+ #: views/admin_tools_settings.php:31
648
+ msgid "Send Registration Reminder Email too"
649
+ msgstr "同时发送注册提醒邮件"
650
+
651
+ #: views/admin_tools_settings.php:34
652
+ msgid "Submit"
653
+ msgstr "提交"
654
+
655
+ #: views/edit.php:58
656
+ msgid "Update"
657
+ msgstr "更新"
658
+
659
+ #: views/forgot_password.php:5
660
+ msgid "Email Address"
661
+ msgstr "Email地址"
662
+
663
+ #: views/forgot_password.php:12
664
+ msgid "Reset Password"
665
+ msgstr "重置密码"
666
+
667
+ #: views/loggedin.php:3 views/login_widget_logged.php:3
668
+ msgid "Logged in as"
669
+ msgstr "以以下身份登陆"
670
+
671
+ #: views/loggedin.php:11 views/login_widget_logged.php:9
672
+ msgid "Membership"
673
+ msgstr "会员"
674
+
675
+ #: views/loggedin.php:15 views/login_widget_logged.php:13
676
+ msgid "Logout"
677
+ msgstr "退出登陆"
678
+
679
+ #: views/login.php:17
680
+ msgid "Remember Me"
681
+ msgstr "记住这个身份"
682
+
683
+ #: views/login.php:26
684
+ msgid "Forgot Password"
685
+ msgstr "忘记密码"
686
+
687
+ #: views/login.php:30
688
+ msgid "Join Us"
689
+ msgstr "加入会员"
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: smp7, wp.insider
3
  Donate link: https://simple-membership-plugin.com/
4
  Tags: member, members, members only, membership, memberships, register, WordPress membership plugin, content, content protection, paypal, restrict, restrict access, Restrict content, admin, access control, subscription, teaser, protection, profile, login, login page, bbpress, stripe, braintree
5
  Requires at least: 4.0
6
- Tested up to: 5.3
7
- Stable tag: 3.9.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -158,6 +158,19 @@ https://simple-membership-plugin.com/
158
 
159
  == Changelog ==
160
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  = 3.9.5 =
162
  - Added a new filter (swpm_mini_login_output). It can be used to override the [swpm_mini_login] shortcode's output.
163
  - The "Edit" link in the members menu has been renamed to "Edit/View" to make it more user-friendly.
3
  Donate link: https://simple-membership-plugin.com/
4
  Tags: member, members, members only, membership, memberships, register, WordPress membership plugin, content, content protection, paypal, restrict, restrict access, Restrict content, admin, access control, subscription, teaser, protection, profile, login, login page, bbpress, stripe, braintree
5
  Requires at least: 4.0
6
+ Tested up to: 5.4
7
+ Stable tag: 3.9.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
158
 
159
  == Changelog ==
160
 
161
+ = 3.9.7 =
162
+ - Added minor improvements to the get_current_page_url() function to increase compatibility with some servers.
163
+ - The mini login shortcode will also work with the "Enable Redirect to Last Page" feature from the after login redirection addon.
164
+ - Updated the Japanese language translation file.
165
+ - Minor Stripe SCA button related enhancements (added filter).
166
+ - Stripe buy now transactions (One-time payments) will now have a link to the user "profile" in the "payments" menu.
167
+ - Chinese language file name changed from zh_Hans to zh_HK.
168
+
169
+ = 3.9.6 =
170
+ - Added a new global settings for Stripe API keys in the "Payment Settings" tab. It can be used to enter your API keys (instead of individual buttons each time).
171
+ - Added a new filter to allow customization of the email activation message (if the email activation feature is enabled).
172
+ - The subsequent payments for stripe subscription will also be captured in the payments menu. Need to add the "invoice.payment_succeeded" to the webhook events monitoring.
173
+
174
  = 3.9.5 =
175
  - Added a new filter (swpm_mini_login_output). It can be used to override the [swpm_mini_login] shortcode's output.
176
  - The "Edit" link in the members menu has been renamed to "Edit/View" to make it more user-friendly.
simple-wp-membership.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Simple WordPress Membership
4
- Version: 3.9.5
5
  Plugin URI: https://simple-membership-plugin.com/
6
  Author: smp7, wp.insider
7
  Author URI: https://simple-membership-plugin.com/
@@ -19,7 +19,7 @@ include_once('classes/class.simple-wp-membership.php');
19
  include_once('classes/class.swpm-cronjob.php');
20
  include_once('swpm-compat.php');
21
 
22
- define('SIMPLE_WP_MEMBERSHIP_VER', '3.9.5');
23
  define('SIMPLE_WP_MEMBERSHIP_DB_VER', '1.3');
24
  define('SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL', home_url());
25
  define('SIMPLE_WP_MEMBERSHIP_PATH', dirname(__FILE__) . '/');
1
  <?php
2
  /*
3
  Plugin Name: Simple WordPress Membership
4
+ Version: 3.9.7
5
  Plugin URI: https://simple-membership-plugin.com/
6
  Author: smp7, wp.insider
7
  Author URI: https://simple-membership-plugin.com/
19
  include_once('classes/class.swpm-cronjob.php');
20
  include_once('swpm-compat.php');
21
 
22
+ define('SIMPLE_WP_MEMBERSHIP_VER', '3.9.7');
23
  define('SIMPLE_WP_MEMBERSHIP_DB_VER', '1.3');
24
  define('SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL', home_url());
25
  define('SIMPLE_WP_MEMBERSHIP_PATH', dirname(__FILE__) . '/');
views/admin_settings.php CHANGED
@@ -1,7 +1,7 @@
1
 
2
  <!-- This file outputs the settings form fields for a lot of the settings pages -->
3
  <form action="options.php" method="POST">
4
- <input type="hidden" name="tab" value="<?php echo $current_tab; ?>" />
5
  <?php settings_fields('swpm-settings-tab-' . $current_tab); ?>
6
  <?php do_settings_sections('simple_wp_membership_settings'); ?>
7
  <?php submit_button(); ?>
1
 
2
  <!-- This file outputs the settings form fields for a lot of the settings pages -->
3
  <form action="options.php" method="POST">
4
+ <input type="hidden" name="tab" value="<?php echo $current_tab;?>" />
5
  <?php settings_fields('swpm-settings-tab-' . $current_tab); ?>
6
  <?php do_settings_sections('simple_wp_membership_settings'); ?>
7
  <?php submit_button(); ?>
views/payments/admin_create_payment_buttons.php CHANGED
@@ -25,22 +25,30 @@ if ( ! isset( $_REQUEST['swpm_button_type_selected'] ) ) {
25
  <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Select Payment Button Type' ); ?></label></h3>
26
  <div class="inside">
27
  <form action="" method="post">
28
- <label><input type="radio" name="button_type" value="pp_buy_now" checked> <?php SwpmUtils::e( 'PayPal Buy Now' ); ?></label>
 
 
 
 
29
  <br />
30
- <label><input type="radio" name="button_type" value="pp_subscription"> <?php SwpmUtils::e( 'PayPal Subscription' ); ?></label>
31
  <br />
32
- <label><input type="radio" name="button_type" value="pp_smart_checkout"> <?php SwpmUtils::e( 'PayPal Smart Checkout' ); ?></label>
33
  <br />
34
- <label><input type="radio" name="button_type" value="stripe_buy_now"> <?php SwpmUtils::e( 'Stripe Buy Now' ); ?></label>
35
  <br />
36
- <label><input type="radio" name="button_type" value="stripe_subscription"> <?php SwpmUtils::e( 'Stripe Subscription' ); ?></label>
37
  <br />
38
- <label><input type="radio" name="button_type" value="stripe_sca_buy_now"> <?php SwpmUtils::e( 'Stripe SCA Buy Now' ); ?></label>
39
  <br />
40
- <label><input type="radio" name="button_type" value="stripe_sca_subscription"> <?php SwpmUtils::e( 'Stripe SCA Subscription' ); ?></label>
41
  <br />
42
- <label><input type="radio" name="button_type" value="braintree_buy_now"> <?php SwpmUtils::e( 'Braintree Buy Now' ); ?></label>
43
  <br />
 
 
 
 
44
  <?php
45
  apply_filters( 'swpm_new_button_select_button_type', '' );
46
  wp_nonce_field( 'swpm_admin_create_btns', 'swpm_admin_create_btns' );
25
  <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Select Payment Button Type' ); ?></label></h3>
26
  <div class="inside">
27
  <form action="" method="post">
28
+ <table class="form-table" role="presentation">
29
+ <tr>
30
+ <td>
31
+ <fieldset>
32
+ <label><input type="radio" name="button_type" value="pp_buy_now" checked /> <?php SwpmUtils::e( 'PayPal Buy Now' ); ?></label>
33
  <br />
34
+ <label><input type="radio" name="button_type" value="pp_subscription" /> <?php SwpmUtils::e( 'PayPal Subscription' ); ?></label>
35
  <br />
36
+ <label><input type="radio" name="button_type" value="pp_smart_checkout" /> <?php SwpmUtils::e( 'PayPal Smart Checkout' ); ?></label>
37
  <br />
38
+ <label><input type="radio" name="button_type" value="braintree_buy_now" /> <?php SwpmUtils::e( 'Braintree Buy Now' ); ?></label>
39
  <br />
40
+ <label><input type="radio" name="button_type" value="stripe_sca_buy_now" /> <?php SwpmUtils::e( 'Stripe SCA Buy Now' ); ?></label>
41
  <br />
42
+ <label><input type="radio" name="button_type" value="stripe_sca_subscription" /> <?php SwpmUtils::e( 'Stripe SCA Subscription' ); ?></label>
43
  <br />
44
+ <label><input type="radio" name="button_type" value="stripe_buy_now" /> <?php SwpmUtils::e( 'Stripe Legacy Buy Now (deprecated)' ); ?></label>
45
  <br />
46
+ <label><input type="radio" name="button_type" value="stripe_subscription" /> <?php SwpmUtils::e( 'Stripe Legacy Subscription (deprecated)' ); ?></label>
47
  <br />
48
+ </fieldset>
49
+ </td>
50
+ </tr>
51
+ </table>
52
  <?php
53
  apply_filters( 'swpm_new_button_select_button_type', '' );
54
  wp_nonce_field( 'swpm_admin_create_btns', 'swpm_admin_create_btns' );
views/payments/admin_payment_settings.php CHANGED
@@ -1,47 +1,54 @@
1
-
2
- <div id="poststuff"><div id="post-body">
3
-
4
- <?php
5
- global $wpdb;
6
-
7
- if (isset($_POST['swpm_generate_adv_code'])) {
8
- $paypal_ipn_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '/?swpm_process_ipn=1';
9
- $mem_level = trim(sanitize_text_field($_POST['swpm_paypal_adv_member_level']));
10
- $mem_level = absint($mem_level);
11
- $query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id !=1 AND id =%d", $mem_level);
12
- $membership_level_resultset = $wpdb->get_row($query);
13
- if ($membership_level_resultset) {
14
- $pp_av_code = 'notify_url=' . $paypal_ipn_url . '<br /> ' . 'custom=subsc_ref=' . $mem_level;
15
- echo '<div id="message" class="updated fade"><p>';
16
- echo '<strong>Paste the code below in the "Add advanced variables" field of your PayPal button for membership level ' . $mem_level . '</strong>';
17
- echo '<br /><br /><code>' . $pp_av_code . '</code>';
18
- echo '</p></div>';
19
- } else {
20
- echo '<div id="message" class="updated fade"><p><strong>';
21
- SwpmUtils::e('Error! The membership level ID (' . $mem_level . ') you specified is incorrect. Please check this value again.');
22
- echo '</strong></p></div>';
23
- }
24
- }
25
-
26
- echo '<div class="swpm-grey-box">';
27
- echo '<p>';
28
- SwpmUtils::e('You can create membership payment buttons from the payments menu of this plugin (useful if you want to offer paid membership on the site).');
29
- echo '</p>';
30
- echo '</div>';
31
- ?>
32
- <div class="postbox">
33
- <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_('PayPal Integration Settings') ?></label></h3>
34
- <div class="inside">
35
-
36
- <p><strong><?php echo SwpmUtils::_('Generate the "Advanced Variables" Code for your PayPal button') ?></strong></p>
37
-
38
- <form action="" method="post">
39
- <?php echo SwpmUtils::_('Enter the Membership Level ID') ?>
40
- <input type="text" value="" size="4" name="swpm_paypal_adv_member_level">
41
- <input type="submit" value="<?php echo SwpmUtils::_('Generate Code') ?>" class="button-primary" name="swpm_generate_adv_code">
42
- </form>
43
-
44
- </div></div>
45
-
46
- </div></div><!-- end of poststuff and post-body -->
47
-
 
 
 
 
 
 
 
1
+ <div id="poststuff">
2
+ <div id="post-body">
3
+
4
+ <?php
5
+ global $wpdb;
6
+
7
+ if ( isset( $_POST['swpm_generate_adv_code'] ) ) {
8
+ $paypal_ipn_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '/?swpm_process_ipn=1';
9
+ $mem_level = trim( sanitize_text_field( $_POST['swpm_paypal_adv_member_level'] ) );
10
+ $mem_level = absint( $mem_level );
11
+ $query = $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'swpm_membership_tbl WHERE id !=1 AND id =%d', $mem_level );
12
+ $membership_level_resultset = $wpdb->get_row( $query );
13
+ if ( $membership_level_resultset ) {
14
+ $pp_av_code = 'notify_url=' . $paypal_ipn_url . '<br /> ' . 'custom=subsc_ref=' . $mem_level;
15
+ echo '<div id="message" class="updated fade"><p>';
16
+ echo '<strong>Paste the code below in the "Add advanced variables" field of your PayPal button for membership level ' . $mem_level . '</strong>';
17
+ echo '<br /><br /><code>' . $pp_av_code . '</code>';
18
+ echo '</p></div>';
19
+ } else {
20
+ echo '<div id="message" class="updated fade"><p><strong>';
21
+ SwpmUtils::e( 'Error! The membership level ID (' . $mem_level . ') you specified is incorrect. Please check this value again.' );
22
+ echo '</strong></p></div>';
23
+ }
24
+ }
25
+
26
+ echo '<div class="swpm-grey-box">';
27
+ echo '<p>';
28
+ SwpmUtils::e( 'You can create membership payment buttons from the payments menu of this plugin (useful if you want to offer paid membership on the site).' );
29
+ echo '</p>';
30
+ echo '</div>';
31
+ ?>
32
+ <div class="postbox">
33
+ <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'PayPal Integration Settings' ); ?></label></h3>
34
+ <div class="inside">
35
+
36
+ <p><strong><?php echo SwpmUtils::_( 'Generate the "Advanced Variables" Code for your PayPal button' ); ?></strong></p>
37
+
38
+ <form action="" method="post">
39
+ <?php echo SwpmUtils::_( 'Enter the Membership Level ID' ); ?>
40
+ <input type="text" value="" size="4" name="swpm_paypal_adv_member_level">
41
+ <input type="submit" value="<?php echo SwpmUtils::_( 'Generate Code' ); ?>" class="button-primary" name="swpm_generate_adv_code">
42
+ </form>
43
+
44
+ </div>
45
+ </div>
46
+
47
+ </div>
48
+ </div><!-- end of poststuff and post-body -->
49
+ <form action="options.php" method="POST">
50
+ <input type="hidden" name="tab" value="2" />
51
+ <?php settings_fields( 'swpm-settings-tab-' . $current_tab ); ?>
52
+ <?php do_settings_sections( 'simple_wp_membership_settings' ); ?>
53
+ <?php submit_button(); ?>
54
+ </form>
views/payments/payment-gateway/admin_stripe_buy_now_button.php CHANGED
@@ -1,440 +1,536 @@
1
- <?php
2
- /* * ***************************************************************
3
- * Render the new Stripe Buy Now payment button creation interface
4
- * ************************************************************** */
5
- add_action('swpm_create_new_button_for_stripe_buy_now', 'swpm_create_new_stripe_buy_now_button');
6
-
7
- function swpm_create_new_stripe_buy_now_button() {
8
-
9
- //Test for PHP v5.3.3 or show error and don't show the remaining interface.
10
- if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
11
- //The server is using at least PHP version 5.3.3
12
- //Can use Stripe gateway library
13
- } else {
14
- //This server can't handle Stripe library
15
- echo '<div class="swpm-red-box">';
16
- echo '<p>The Stripe payment gateway libary requires at least PHP 5.3.3. Your server is using a very old version of PHP that Stripe does not support.</p>';
17
- echo '<p>Request your hosting provider to upgrade your PHP to a more recent version then you will be able to use the Stripe gateway.<p>';
18
- echo '</div>';
19
- return;
20
- }
21
- ?>
22
-
23
- <div class="swpm-orange-box">
24
- View the <a target="_blank" href="https://simple-membership-plugin.com/create-stripe-buy-now-button-for-membership-payment/">documentation</a>&nbsp;
25
- to learn how to create a Stripe Buy Now payment button and use it.
26
- </div>
27
-
28
- <div class="postbox">
29
- <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_('Stripe Buy Now Button Configuration'); ?></label></h3>
30
- <div class="inside">
31
-
32
- <form id="stripe_button_config_form" method="post">
33
- <input type="hidden" name="button_type" value="<?php echo sanitize_text_field($_REQUEST['button_type']); ?>">
34
- <input type="hidden" name="swpm_button_type_selected" value="1">
35
-
36
- <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
37
-
38
- <tr valign="top">
39
- <th scope="row"><?php echo SwpmUtils::_('Button Title'); ?></th>
40
- <td>
41
- <input type="text" size="50" name="button_name" value="" required />
42
- <p class="description">Give this membership payment button a name. Example: Gold membership payment</p>
43
- </td>
44
- </tr>
45
-
46
- <tr valign="top">
47
- <th scope="row"><?php echo SwpmUtils::_('Membership Level'); ?></th>
48
- <td>
49
- <select id="membership_level_id" name="membership_level_id">
50
- <?php echo SwpmUtils::membership_level_dropdown(); ?>
51
- </select>
52
- <p class="description">Select the membership level this payment button is for.</p>
53
- </td>
54
- </tr>
55
-
56
- <tr valign="top">
57
- <th scope="row"><?php echo SwpmUtils::_('Payment Amount'); ?></th>
58
- <td>
59
- <input type="text" size="6" name="payment_amount" value="" required />
60
- <p class="description">Enter payment amount. Example values: 10.00 or 19.50 or 299.95 etc (do not put currency symbol).</p>
61
- </td>
62
- </tr>
63
-
64
- <tr valign="top">
65
- <th scope="row"><?php echo SwpmUtils::_('Payment Currency'); ?></th>
66
- <td>
67
- <select id="payment_currency" name="payment_currency">
68
- <option selected="selected" value="USD">US Dollars ($)</option>
69
- <option value="EUR">Euros (€)</option>
70
- <option value="GBP">Pounds Sterling (£)</option>
71
- <option value="AUD">Australian Dollars ($)</option>
72
- <option value="BRL">Brazilian Real (R$)</option>
73
- <option value="CAD">Canadian Dollars ($)</option>
74
- <option value="CNY">Chinese Yuan</option>
75
- <option value="CZK">Czech Koruna</option>
76
- <option value="DKK">Danish Krone</option>
77
- <option value="HKD">Hong Kong Dollar ($)</option>
78
- <option value="HUF">Hungarian Forint</option>
79
- <option value="INR">Indian Rupee</option>
80
- <option value="IDR">Indonesia Rupiah</option>
81
- <option value="ILS">Israeli Shekel</option>
82
- <option value="JPY">Japanese Yen (¥)</option>
83
- <option value="MYR">Malaysian Ringgits</option>
84
- <option value="MXN">Mexican Peso ($)</option>
85
- <option value="NZD">New Zealand Dollar ($)</option>
86
- <option value="NOK">Norwegian Krone</option>
87
- <option value="PHP">Philippine Pesos</option>
88
- <option value="PLN">Polish Zloty</option>
89
- <option value="SGD">Singapore Dollar ($)</option>
90
- <option value="ZAR">South African Rand (R)</option>
91
- <option value="KRW">South Korean Won</option>
92
- <option value="SEK">Swedish Krona</option>
93
- <option value="CHF">Swiss Franc</option>
94
- <option value="TWD">Taiwan New Dollars</option>
95
- <option value="THB">Thai Baht</option>
96
- <option value="TRY">Turkish Lira</option>
97
- <option value="VND">Vietnamese Dong</option>
98
- </select>
99
- <p class="description">Select the currency for this payment button.</p>
100
- </td>
101
- </tr>
102
-
103
- <tr valign="top">
104
- <th colspan="2"><div class="swpm-grey-box"><?php echo SwpmUtils::_('Stripe API keys. You can get this from your Stripe account.'); ?></div></th>
105
- </tr>
106
-
107
- <tr valign="top">
108
- <th scope="row"><?php echo SwpmUtils::_('Test Publishable Key'); ?></th>
109
- <td>
110
- <input type="text" size="50" name="stripe_test_publishable_key" value="" required />
111
- <p class="description">Enter your Stripe test publishable key.</p>
112
- </td>
113
- </tr>
114
- <tr valign="top">
115
- <th scope="row"><?php echo SwpmUtils::_('Test Secret Key'); ?></th>
116
- <td>
117
- <input type="text" size="50" name="stripe_test_secret_key" value="" required />
118
- <p class="description">Enter your Stripe test secret key.</p>
119
- </td>
120
- </tr>
121
- <tr valign="top">
122
- <th scope="row"><?php echo SwpmUtils::_('Live Publishable Key'); ?></th>
123
- <td>
124
- <input type="text" size="50" name="stripe_live_publishable_key" value="" required />
125
- <p class="description">Enter your Stripe live publishable key.</p>
126
- </td>
127
- </tr>
128
- <tr valign="top">
129
- <th scope="row"><?php echo SwpmUtils::_('Live Secret Key'); ?></th>
130
- <td>
131
- <input type="text" size="50" name="stripe_live_secret_key" value="" required />
132
- <p class="description">Enter your Stripe live secret key.</p>
133
- </td>
134
- </tr>
135
-
136
- <tr valign="top">
137
- <th colspan="2"><div class="swpm-grey-box"><?php echo SwpmUtils::_('The following details are optional.'); ?></div></th>
138
- </tr>
139
-
140
- <tr valign="top">
141
- <th scope="row"><?php echo SwpmUtils::_('Collect Customer Address'); ?></th>
142
- <td>
143
- <input type="checkbox" name="collect_address" value="1"/>
144
- <p class="description">Enable this option if you want to collect customer address during Stripe checkout.</p>
145
- </td>
146
- </tr>
147
-
148
- <tr valign="top">
149
- <th scope="row"><?php echo SwpmUtils::_('Return URL'); ?></th>
150
- <td>
151
- <input type="text" size="100" name="return_url" value="" />
152
- <p class="description">This is the URL the user will be redirected to after a successful payment. Enter the URL of your Thank You page here.</p>
153
- </td>
154
- </tr>
155
-
156
- </table>
157
-
158
- <p class="submit">
159
- <?php wp_nonce_field('swpm_admin_add_edit_stripe_buy_now_btn','swpm_admin_create_stripe_buy_now_btn') ?>
160
- <input type="submit" name="swpm_stripe_buy_now_save_submit" class="button-primary" value="<?php echo SwpmUtils::_('Save Payment Data'); ?>" >
161
- </p>
162
-
163
- </form>
164
-
165
- </div>
166
- </div>
167
- <?php
168
- }
169
-
170
- /*
171
- * Process submission and save the new Stripe Buy now payment button data
172
- */
173
- add_action('swpm_create_new_button_process_submission', 'swpm_save_new_stripe_buy_now_button_data');
174
-
175
- function swpm_save_new_stripe_buy_now_button_data() {
176
- if (isset($_REQUEST['swpm_stripe_buy_now_save_submit'])) {
177
- //This is a Stripe buy now button save event. Process the submission.
178
- check_admin_referer( 'swpm_admin_add_edit_stripe_buy_now_btn', 'swpm_admin_create_stripe_buy_now_btn' );
179
-
180
- //Save the button data
181
- $button_id = wp_insert_post(
182
- array(
183
- 'post_title' => sanitize_text_field($_REQUEST['button_name']),
184
- 'post_type' => 'swpm_payment_button',
185
- 'post_content' => '',
186
- 'post_status' => 'publish'
187
- )
188
- );
189
-
190
- $button_type = sanitize_text_field($_REQUEST['button_type']);
191
- add_post_meta($button_id, 'button_type', $button_type);
192
- add_post_meta($button_id, 'membership_level_id', sanitize_text_field($_REQUEST['membership_level_id']));
193
- add_post_meta($button_id, 'payment_amount', trim(sanitize_text_field($_REQUEST['payment_amount'])));
194
- add_post_meta($button_id, 'payment_currency', sanitize_text_field($_REQUEST['payment_currency']));
195
-
196
- add_post_meta($button_id, 'stripe_test_secret_key', trim(sanitize_text_field($_REQUEST['stripe_test_secret_key'])));
197
- add_post_meta($button_id, 'stripe_test_publishable_key', trim(sanitize_text_field($_REQUEST['stripe_test_publishable_key'])));
198
- add_post_meta($button_id, 'stripe_live_secret_key', trim(sanitize_text_field($_REQUEST['stripe_live_secret_key'])));
199
- add_post_meta($button_id, 'stripe_live_publishable_key', trim(sanitize_text_field($_REQUEST['stripe_live_publishable_key'])));
200
-
201
- add_post_meta($button_id, 'stripe_collect_address', isset($_POST['collect_address']) ? '1' : '');
202
-
203
- add_post_meta($button_id, 'return_url', trim(sanitize_text_field($_REQUEST['return_url'])));
204
- //add_post_meta($button_id, 'button_image_url', trim(sanitize_text_field($_REQUEST['button_image_url'])));
205
- //Redirect to the edit interface of this button with $button_id
206
- //$url = admin_url() . 'admin.php?page=simple_wp_membership_payments&tab=edit_button&button_id=' . $button_id . '&button_type=' . $button_type;
207
- //Redirect to the manage payment buttons interface
208
- $url = admin_url() . 'admin.php?page=simple_wp_membership_payments&tab=payment_buttons';
209
- SwpmMiscUtils::redirect_to_url($url);
210
- }
211
- }
212
-
213
- /* * **********************************************************************
214
- * End of new Stripe Buy now payment button stuff
215
- * ********************************************************************** */
216
-
217
-
218
- /* * ***************************************************************
219
- * Render edit Stripe Buy now payment button interface
220
- * ************************************************************** */
221
- add_action('swpm_edit_payment_button_for_stripe_buy_now', 'swpm_edit_stripe_buy_now_button');
222
-
223
- function swpm_edit_stripe_buy_now_button() {
224
-
225
- //Retrieve the payment button data and present it for editing.
226
-
227
- $button_id = sanitize_text_field($_REQUEST['button_id']);
228
- $button_id = absint($button_id);
229
- $button_type = sanitize_text_field($_REQUEST['button_type']);
230
-
231
- $button = get_post($button_id); //Retrieve the CPT for this button
232
-
233
- $membership_level_id = get_post_meta($button_id, 'membership_level_id', true);
234
- $payment_amount = get_post_meta($button_id, 'payment_amount', true);
235
- $payment_currency = get_post_meta($button_id, 'payment_currency', true);
236
-
237
- $stripe_test_secret_key = get_post_meta($button_id, 'stripe_test_secret_key', true);
238
- $stripe_test_publishable_key = get_post_meta($button_id, 'stripe_test_publishable_key', true);
239
- $stripe_live_secret_key = get_post_meta($button_id, 'stripe_live_secret_key', true);
240
- $stripe_live_publishable_key = get_post_meta($button_id, 'stripe_live_publishable_key', true);
241
-
242
- $collect_address = get_post_meta($button_id, 'stripe_collect_address', true);
243
- if ($collect_address == '1') {
244
- $collect_address = ' checked';
245
- } else {
246
- $collect_address = '';
247
- }
248
-
249
- $return_url = get_post_meta($button_id, 'return_url', true);
250
- //$button_image_url = get_post_meta($button_id, 'button_image_url', true);
251
- ?>
252
- <div class="postbox">
253
- <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_('Stripe Buy Now Button Configuration'); ?></label></h3>
254
- <div class="inside">
255
-
256
- <form id="stripe_button_config_form" method="post">
257
- <input type="hidden" name="button_type" value="<?php echo $button_type; ?>">
258
-
259
- <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
260
-
261
- <tr valign="top">
262
- <th scope="row"><?php echo SwpmUtils::_('Button ID'); ?></th>
263
- <td>
264
- <input type="text" size="10" name="button_id" value="<?php echo $button_id; ?>" readonly required />
265
- <p class="description">This is the ID of this payment button. It is automatically generated for you and it cannot be changed.</p>
266
- </td>
267
- </tr>
268
- <tr valign="top">
269
- <th scope="row"><?php echo SwpmUtils::_('Button Title'); ?></th>
270
- <td>
271
- <input type="text" size="50" name="button_name" value="<?php echo $button->post_title; ?>" required />
272
- <p class="description">Give this membership payment button a name. Example: Gold membership payment</p>
273
- </td>
274
- </tr>
275
- <tr valign="top">
276
- <th scope="row"><?php echo SwpmUtils::_('Membership Level'); ?></th>
277
- <td>
278
- <select id="membership_level_id" name="membership_level_id">
279
- <?php echo SwpmUtils::membership_level_dropdown($membership_level_id); ?>
280
- </select>
281
- <p class="description">Select the membership level this payment button is for.</p>
282
- </td>
283
- </tr>
284
- <tr valign="top">
285
- <th scope="row"><?php echo SwpmUtils::_('Payment Amount'); ?></th>
286
- <td>
287
- <input type="text" size="6" name="payment_amount" value="<?php echo $payment_amount; ?>" required />
288
- <p class="description">Enter payment amount. Example values: 10.00 or 19.50 or 299.95 etc (do not put currency symbol).</p>
289
- </td>
290
- </tr>
291
- <tr valign="top">
292
- <th scope="row"><?php echo SwpmUtils::_('Payment Currency'); ?></th>
293
- <td>
294
- <select id="payment_currency" name="payment_currency">
295
- <option value="USD" <?php echo ($payment_currency == 'USD') ? 'selected="selected"' : ''; ?>>US Dollars ($)</option>
296
- <option value="EUR" <?php echo ($payment_currency == 'EUR') ? 'selected="selected"' : ''; ?>>Euros (€)</option>
297
- <option value="GBP" <?php echo ($payment_currency == 'GBP') ? 'selected="selected"' : ''; ?>>Pounds Sterling (£)</option>
298
- <option value="AUD" <?php echo ($payment_currency == 'AUD') ? 'selected="selected"' : ''; ?>>Australian Dollars ($)</option>
299
- <option value="BRL" <?php echo ($payment_currency == 'BRL') ? 'selected="selected"' : ''; ?>>Brazilian Real (R$)</option>
300
- <option value="CAD" <?php echo ($payment_currency == 'CAD') ? 'selected="selected"' : ''; ?>>Canadian Dollars ($)</option>
301
- <option value="CNY" <?php echo ($payment_currency == 'CNY') ? 'selected="selected"' : ''; ?>>Chinese Yuan</option>
302
- <option value="CZK" <?php echo ($payment_currency == 'CZK') ? 'selected="selected"' : ''; ?>>Czech Koruna</option>
303
- <option value="DKK" <?php echo ($payment_currency == 'DKK') ? 'selected="selected"' : ''; ?>>Danish Krone</option>
304
- <option value="HKD" <?php echo ($payment_currency == 'HKD') ? 'selected="selected"' : ''; ?>>Hong Kong Dollar ($)</option>
305
- <option value="HUF" <?php echo ($payment_currency == 'HUF') ? 'selected="selected"' : ''; ?>>Hungarian Forint</option>
306
- <option value="INR" <?php echo ($payment_currency == 'INR') ? 'selected="selected"' : ''; ?>>Indian Rupee</option>
307
- <option value="IDR" <?php echo ($payment_currency == 'IDR') ? 'selected="selected"' : ''; ?>>Indonesia Rupiah</option>
308
- <option value="ILS" <?php echo ($payment_currency == 'ILS') ? 'selected="selected"' : ''; ?>>Israeli Shekel</option>
309
- <option value="JPY" <?php echo ($payment_currency == 'JPY') ? 'selected="selected"' : ''; ?>>Japanese Yen (¥)</option>
310
- <option value="MYR" <?php echo ($payment_currency == 'MYR') ? 'selected="selected"' : ''; ?>>Malaysian Ringgits</option>
311
- <option value="MXN" <?php echo ($payment_currency == 'MXN') ? 'selected="selected"' : ''; ?>>Mexican Peso ($)</option>
312
- <option value="NZD" <?php echo ($payment_currency == 'NZD') ? 'selected="selected"' : ''; ?>>New Zealand Dollar ($)</option>
313
- <option value="NOK" <?php echo ($payment_currency == 'NOK') ? 'selected="selected"' : ''; ?>>Norwegian Krone</option>
314
- <option value="PHP" <?php echo ($payment_currency == 'PHP') ? 'selected="selected"' : ''; ?>>Philippine Pesos</option>
315
- <option value="PLN" <?php echo ($payment_currency == 'PLN') ? 'selected="selected"' : ''; ?>>Polish Zloty</option>
316
- <option value="SGD" <?php echo ($payment_currency == 'SGD') ? 'selected="selected"' : ''; ?>>Singapore Dollar ($)</option>
317
- <option value="ZAR" <?php echo ($payment_currency == 'ZAR') ? 'selected="selected"' : ''; ?>>South African Rand (R)</option>
318
- <option value="KRW" <?php echo ($payment_currency == 'KRW') ? 'selected="selected"' : ''; ?>>South Korean Won</option>
319
- <option value="SEK" <?php echo ($payment_currency == 'SEK') ? 'selected="selected"' : ''; ?>>Swedish Krona</option>
320
- <option value="CHF" <?php echo ($payment_currency == 'CHF') ? 'selected="selected"' : ''; ?>>Swiss Franc</option>
321
- <option value="TWD" <?php echo ($payment_currency == 'TWD') ? 'selected="selected"' : ''; ?>>Taiwan New Dollars</option>
322
- <option value="THB" <?php echo ($payment_currency == 'THB') ? 'selected="selected"' : ''; ?>>Thai Baht</option>
323
- <option value="TRY" <?php echo ($payment_currency == 'TRY') ? 'selected="selected"' : ''; ?>>Turkish Lira</option>
324
- <option value="VND" <?php echo ($payment_currency == 'VND') ? 'selected="selected"' : ''; ?>>Vietnamese Dong</option>
325
- </select>
326
- <p class="description">Select the currency for this payment button.</p>
327
- </td>
328
- </tr>
329
-
330
- <tr valign="top">
331
- <th colspan="2"><div class="swpm-grey-box"><?php echo SwpmUtils::_('Stripe API keys. You can get this from your Stripe account.'); ?></div></th>
332
- </tr>
333
-
334
- <tr valign="top">
335
- <th scope="row"><?php echo SwpmUtils::_('Test Publishable Key'); ?></th>
336
- <td>
337
- <input type="text" size="50" name="stripe_test_publishable_key" value="<?php echo $stripe_test_publishable_key; ?>" required />
338
- <p class="description">Enter your Stripe test publishable key.</p>
339
- </td>
340
- </tr>
341
- <tr valign="top">
342
- <th scope="row"><?php echo SwpmUtils::_('Test Secret Key'); ?></th>
343
- <td>
344
- <input type="text" size="50" name="stripe_test_secret_key" value="<?php echo $stripe_test_secret_key; ?>" required />
345
- <p class="description">Enter your Stripe test secret key.</p>
346
- </td>
347
- </tr>
348
- <tr valign="top">
349
- <th scope="row"><?php echo SwpmUtils::_('Live Publishable Key'); ?></th>
350
- <td>
351
- <input type="text" size="50" name="stripe_live_publishable_key" value="<?php echo $stripe_live_publishable_key; ?>" required />
352
- <p class="description">Enter your Stripe live publishable key.</p>
353
- </td>
354
- </tr>
355
- <tr valign="top">
356
- <th scope="row"><?php echo SwpmUtils::_('Live Secret Key'); ?></th>
357
- <td>
358
- <input type="text" size="50" name="stripe_live_secret_key" value="<?php echo $stripe_live_secret_key; ?>" required />
359
- <p class="description">Enter your Stripe live secret key.</p>
360
- </td>
361
- </tr>
362
-
363
- <tr valign="top">
364
- <th colspan="2"><div class="swpm-grey-box"><?php echo SwpmUtils::_('The following details are optional.'); ?></div></th>
365
- </tr>
366
-
367
- <tr valign="top">
368
- <th scope="row"><?php echo SwpmUtils::_('Collect Customer Address'); ?></th>
369
- <td>
370
- <input type="checkbox" name="collect_address" value="1"<?php echo $collect_address; ?>/>
371
- <p class="description">Enable this option if you want to collect customer address during Stripe checkout.</p>
372
- </td>
373
- </tr>
374
-
375
- <tr valign="top">
376
- <th scope="row"><?php echo SwpmUtils::_('Return URL'); ?></th>
377
- <td>
378
- <input type="text" size="100" name="return_url" value="<?php echo $return_url; ?>" />
379
- <p class="description">This is the URL the user will be redirected to after a successful payment. Enter the URL of your Thank You page here.</p>
380
- </td>
381
- </tr>
382
-
383
- </table>
384
-
385
- <p class="submit">
386
- <?php wp_nonce_field('swpm_admin_add_edit_stripe_buy_now_btn','swpm_admin_edit_stripe_buy_now_btn') ?>
387
- <input type="submit" name="swpm_stripe_buy_now_edit_submit" class="button-primary" value="<?php echo SwpmUtils::_('Save Payment Data'); ?>" >
388
- </p>
389
-
390
- </form>
391
-
392
- </div>
393
- </div>
394
- <?php
395
- }
396
-
397
- /*
398
- * Process submission and save the edited Stripe Buy now payment button data
399
- */
400
- add_action('swpm_edit_payment_button_process_submission', 'swpm_edit_stripe_buy_now_button_data');
401
-
402
- function swpm_edit_stripe_buy_now_button_data() {
403
- if (isset($_REQUEST['swpm_stripe_buy_now_edit_submit'])) {
404
- //This is a Stripe buy now button edit event. Process the submission.
405
- check_admin_referer( 'swpm_admin_add_edit_stripe_buy_now_btn', 'swpm_admin_edit_stripe_buy_now_btn' );
406
- //Update and Save the edited payment button data
407
- $button_id = sanitize_text_field($_REQUEST['button_id']);
408
- $button_id = absint($button_id);
409
- $button_type = sanitize_text_field($_REQUEST['button_type']);
410
- $button_name = sanitize_text_field($_REQUEST['button_name']);
411
-
412
- $button_post = array(
413
- 'ID' => $button_id,
414
- 'post_title' => $button_name,
415
- 'post_type' => 'swpm_payment_button',
416
- );
417
- wp_update_post($button_post);
418
-
419
- update_post_meta($button_id, 'button_type', $button_type);
420
- update_post_meta($button_id, 'membership_level_id', sanitize_text_field($_REQUEST['membership_level_id']));
421
- update_post_meta($button_id, 'payment_amount', trim(sanitize_text_field($_REQUEST['payment_amount'])));
422
- update_post_meta($button_id, 'payment_currency', sanitize_text_field($_REQUEST['payment_currency']));
423
-
424
- update_post_meta($button_id, 'stripe_test_secret_key', trim(sanitize_text_field($_REQUEST['stripe_test_secret_key'])));
425
- update_post_meta($button_id, 'stripe_test_publishable_key', trim(sanitize_text_field($_REQUEST['stripe_test_publishable_key'])));
426
- update_post_meta($button_id, 'stripe_live_secret_key', trim(sanitize_text_field($_REQUEST['stripe_live_secret_key'])));
427
- update_post_meta($button_id, 'stripe_live_publishable_key', trim(sanitize_text_field($_REQUEST['stripe_live_publishable_key'])));
428
-
429
- update_post_meta($button_id, 'stripe_collect_address', isset($_POST['collect_address']) ? '1' : '');
430
-
431
- update_post_meta($button_id, 'return_url', trim(sanitize_text_field($_REQUEST['return_url'])));
432
- //update_post_meta($button_id, 'button_image_url', trim(sanitize_text_field($_REQUEST['button_image_url'])));
433
-
434
- echo '<div id="message" class="updated fade"><p>Payment button data successfully updated!</p></div>';
435
- }
436
- }
437
-
438
- /************************************************************************
439
- * End of edit Stripe Buy now payment button stuff
440
- ************************************************************************/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* * ***************************************************************
3
+ * Render the new Stripe Buy Now payment button creation interface
4
+ * ************************************************************** */
5
+ add_action( 'swpm_create_new_button_for_stripe_buy_now', 'swpm_create_new_stripe_buy_now_button' );
6
+
7
+ function swpm_create_new_stripe_buy_now_button() {
8
+
9
+ //Test for PHP v5.3.3 or show error and don't show the remaining interface.
10
+ if ( version_compare( PHP_VERSION, '5.3.3' ) >= 0 ) {
11
+ //The server is using at least PHP version 5.3.3
12
+ //Can use Stripe gateway library
13
+ } else {
14
+ //This server can't handle Stripe library
15
+ echo '<div class="swpm-red-box">';
16
+ echo '<p>The Stripe payment gateway libary requires at least PHP 5.3.3. Your server is using a very old version of PHP that Stripe does not support.</p>';
17
+ echo '<p>Request your hosting provider to upgrade your PHP to a more recent version then you will be able to use the Stripe gateway.<p>';
18
+ echo '</div>';
19
+ return;
20
+ }
21
+ ?>
22
+
23
+ <div class="swpm-orange-box">
24
+ View the <a target="_blank" href="https://simple-membership-plugin.com/create-stripe-buy-now-button-for-membership-payment/">documentation</a>&nbsp;
25
+ to learn how to create a Stripe Buy Now payment button and use it.
26
+ </div>
27
+
28
+ <div class="postbox">
29
+ <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Stripe Buy Now Button Configuration' ); ?></label></h3>
30
+ <div class="inside">
31
+
32
+ <form id="stripe_button_config_form" method="post">
33
+ <input type="hidden" name="button_type" value="<?php echo sanitize_text_field( $_REQUEST['button_type'] ); ?>">
34
+ <input type="hidden" name="swpm_button_type_selected" value="1">
35
+
36
+ <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
37
+
38
+ <tr valign="top">
39
+ <th scope="row"><?php echo SwpmUtils::_( 'Button Title' ); ?></th>
40
+ <td>
41
+ <input type="text" size="50" name="button_name" value="" required />
42
+ <p class="description">Give this membership payment button a name. Example: Gold membership payment</p>
43
+ </td>
44
+ </tr>
45
+
46
+ <tr valign="top">
47
+ <th scope="row"><?php echo SwpmUtils::_( 'Membership Level' ); ?></th>
48
+ <td>
49
+ <select id="membership_level_id" name="membership_level_id">
50
+ <?php echo SwpmUtils::membership_level_dropdown(); ?>
51
+ </select>
52
+ <p class="description">Select the membership level this payment button is for.</p>
53
+ </td>
54
+ </tr>
55
+
56
+ <tr valign="top">
57
+ <th scope="row"><?php echo SwpmUtils::_( 'Payment Amount' ); ?></th>
58
+ <td>
59
+ <input type="text" size="6" name="payment_amount" value="" required />
60
+ <p class="description">Enter payment amount. Example values: 10.00 or 19.50 or 299.95 etc (do not put currency symbol).</p>
61
+ </td>
62
+ </tr>
63
+
64
+ <tr valign="top">
65
+ <th scope="row"><?php echo SwpmUtils::_( 'Payment Currency' ); ?></th>
66
+ <td>
67
+ <select id="payment_currency" name="payment_currency">
68
+ <option selected="selected" value="USD">US Dollars ($)</option>
69
+ <option value="EUR">Euros (€)</option>
70
+ <option value="GBP">Pounds Sterling (£)</option>
71
+ <option value="AUD">Australian Dollars ($)</option>
72
+ <option value="BRL">Brazilian Real (R$)</option>
73
+ <option value="CAD">Canadian Dollars ($)</option>
74
+ <option value="CNY">Chinese Yuan</option>
75
+ <option value="CZK">Czech Koruna</option>
76
+ <option value="DKK">Danish Krone</option>
77
+ <option value="HKD">Hong Kong Dollar ($)</option>
78
+ <option value="HUF">Hungarian Forint</option>
79
+ <option value="INR">Indian Rupee</option>
80
+ <option value="IDR">Indonesia Rupiah</option>
81
+ <option value="ILS">Israeli Shekel</option>
82
+ <option value="JPY">Japanese Yen (¥)</option>
83
+ <option value="MYR">Malaysian Ringgits</option>
84
+ <option value="MXN">Mexican Peso ($)</option>
85
+ <option value="NZD">New Zealand Dollar ($)</option>
86
+ <option value="NOK">Norwegian Krone</option>
87
+ <option value="PHP">Philippine Pesos</option>
88
+ <option value="PLN">Polish Zloty</option>
89
+ <option value="SGD">Singapore Dollar ($)</option>
90
+ <option value="ZAR">South African Rand (R)</option>
91
+ <option value="KRW">South Korean Won</option>
92
+ <option value="SEK">Swedish Krona</option>
93
+ <option value="CHF">Swiss Franc</option>
94
+ <option value="TWD">Taiwan New Dollars</option>
95
+ <option value="THB">Thai Baht</option>
96
+ <option value="TRY">Turkish Lira</option>
97
+ <option value="VND">Vietnamese Dong</option>
98
+ </select>
99
+ <p class="description">Select the currency for this payment button.</p>
100
+ </td>
101
+ </tr>
102
+
103
+ <tr valign="top">
104
+ <th colspan="2">
105
+ <div class="swpm-grey-box"><?php echo SwpmUtils::_( 'Stripe API keys. You can get this from your Stripe account.' ); ?></div>
106
+ </th>
107
+ </tr>
108
+
109
+ <tr valign="top">
110
+ <th scope="row"><?php echo SwpmUtils::_( 'Use Global API Keys Settings' ); ?></th>
111
+ <td>
112
+ <input type="checkbox" name="stripe_use_global_keys" value="1" checked />
113
+ <p class="description"><?php echo SwpmUtils::_( 'Use API keys from <a href="admin.php?page=simple_wp_membership_settings&tab=2" target="_blank">Payment Settings</a> tab.' ); ?></p>
114
+ </td>
115
+ </tr>
116
+
117
+ <tr valign="top">
118
+ <th scope="row"><?php echo SwpmUtils::_( 'Test Publishable Key' ); ?></th>
119
+ <td>
120
+ <input type="text" size="50" name="stripe_test_publishable_key" value="" required />
121
+ <p class="description">Enter your Stripe test publishable key.</p>
122
+ </td>
123
+ </tr>
124
+ <tr valign="top">
125
+ <th scope="row"><?php echo SwpmUtils::_( 'Test Secret Key' ); ?></th>
126
+ <td>
127
+ <input type="text" size="50" name="stripe_test_secret_key" value="" required />
128
+ <p class="description">Enter your Stripe test secret key.</p>
129
+ </td>
130
+ </tr>
131
+ <tr valign="top">
132
+ <th scope="row"><?php echo SwpmUtils::_( 'Live Publishable Key' ); ?></th>
133
+ <td>
134
+ <input type="text" size="50" name="stripe_live_publishable_key" value="" required />
135
+ <p class="description">Enter your Stripe live publishable key.</p>
136
+ </td>
137
+ </tr>
138
+ <tr valign="top">
139
+ <th scope="row"><?php echo SwpmUtils::_( 'Live Secret Key' ); ?></th>
140
+ <td>
141
+ <input type="text" size="50" name="stripe_live_secret_key" value="" required />
142
+ <p class="description">Enter your Stripe live secret key.</p>
143
+ </td>
144
+ </tr>
145
+
146
+ <tr valign="top">
147
+ <th colspan="2">
148
+ <div class="swpm-grey-box"><?php echo SwpmUtils::_( 'The following details are optional.' ); ?></div>
149
+ </th>
150
+ </tr>
151
+
152
+ <tr valign="top">
153
+ <th scope="row"><?php echo SwpmUtils::_( 'Collect Customer Address' ); ?></th>
154
+ <td>
155
+ <input type="checkbox" name="collect_address" value="1" />
156
+ <p class="description">Enable this option if you want to collect customer address during Stripe checkout.</p>
157
+ </td>
158
+ </tr>
159
+
160
+ <tr valign="top">
161
+ <th scope="row"><?php echo SwpmUtils::_( 'Return URL' ); ?></th>
162
+ <td>
163
+ <input type="text" size="100" name="return_url" value="" />
164
+ <p class="description">This is the URL the user will be redirected to after a successful payment. Enter the URL of your Thank You page here.</p>
165
+ </td>
166
+ </tr>
167
+
168
+ </table>
169
+
170
+ <script>
171
+ var swpmInputsArr = ['stripe_test_publishable_key', 'stripe_test_secret_key', 'stripe_live_publishable_key', 'stripe_live_secret_key'];
172
+ jQuery('input[name="stripe_use_global_keys"').change(function() {
173
+ var checked = jQuery(this).prop('checked');
174
+ jQuery.each(swpmInputsArr, function(index, el) {
175
+ jQuery('input[name="' + el + '"]').prop('disabled', checked);
176
+ });
177
+ });
178
+ jQuery('input[name="stripe_use_global_keys"').trigger('change');
179
+ </script>
180
+
181
+ <p class="submit">
182
+ <?php wp_nonce_field( 'swpm_admin_add_edit_stripe_buy_now_btn', 'swpm_admin_create_stripe_buy_now_btn' ); ?>
183
+ <input type="submit" name="swpm_stripe_buy_now_save_submit" class="button-primary" value="<?php echo SwpmUtils::_( 'Save Payment Data' ); ?>">
184
+ </p>
185
+
186
+ </form>
187
+
188
+ </div>
189
+ </div>
190
+ <?php
191
+ }
192
+
193
+ /*
194
+ * Process submission and save the new Stripe Buy now payment button data
195
+ */
196
+ add_action( 'swpm_create_new_button_process_submission', 'swpm_save_new_stripe_buy_now_button_data' );
197
+
198
+ function swpm_save_new_stripe_buy_now_button_data() {
199
+ if ( isset( $_REQUEST['swpm_stripe_buy_now_save_submit'] ) ) {
200
+ //This is a Stripe buy now button save event. Process the submission.
201
+ check_admin_referer( 'swpm_admin_add_edit_stripe_buy_now_btn', 'swpm_admin_create_stripe_buy_now_btn' );
202
+
203
+ //Save the button data
204
+ $button_id = wp_insert_post(
205
+ array(
206
+ 'post_title' => sanitize_text_field( $_REQUEST['button_name'] ),
207
+ 'post_type' => 'swpm_payment_button',
208
+ 'post_content' => '',
209
+ 'post_status' => 'publish',
210
+ )
211
+ );
212
+
213
+ $button_type = sanitize_text_field( $_REQUEST['button_type'] );
214
+ add_post_meta( $button_id, 'button_type', $button_type );
215
+ add_post_meta( $button_id, 'membership_level_id', sanitize_text_field( $_REQUEST['membership_level_id'] ) );
216
+ add_post_meta( $button_id, 'payment_amount', trim( sanitize_text_field( $_REQUEST['payment_amount'] ) ) );
217
+ add_post_meta( $button_id, 'payment_currency', sanitize_text_field( $_REQUEST['payment_currency'] ) );
218
+
219
+ $stripe_test_secret_key = filter_input( INPUT_POST, 'stripe_test_secret_key', FILTER_SANITIZE_STRING );
220
+ $stripe_test_publishable_key = filter_input( INPUT_POST, 'stripe_test_publishable_key', FILTER_SANITIZE_STRING );
221
+
222
+ if ( ! is_null( $stripe_test_secret_key ) ) {
223
+ update_post_meta( $button_id, 'stripe_test_secret_key', trim( $stripe_test_secret_key ) );
224
+ }
225
+
226
+ if ( ! is_null( $stripe_test_publishable_key ) ) {
227
+ update_post_meta( $button_id, 'stripe_test_publishable_key', trim( $stripe_test_publishable_key ) );
228
+ }
229
+
230
+ $stripe_live_secret_key = filter_input( INPUT_POST, 'stripe_live_secret_key', FILTER_SANITIZE_STRING );
231
+ $stripe_live_publishable_key = filter_input( INPUT_POST, 'stripe_live_publishable_key', FILTER_SANITIZE_STRING );
232
+
233
+ if ( ! is_null( $stripe_live_secret_key ) ) {
234
+ update_post_meta( $button_id, 'stripe_live_secret_key', trim( $stripe_live_secret_key ) );
235
+ }
236
+
237
+ if ( ! is_null( $stripe_live_publishable_key ) ) {
238
+ update_post_meta( $button_id, 'stripe_live_publishable_key', trim( $stripe_live_publishable_key ) );
239
+ }
240
+
241
+ $stripe_use_global_keys = filter_input( INPUT_POST, 'stripe_use_global_keys', FILTER_SANITIZE_NUMBER_INT );
242
+ $stripe_use_global_keys = $stripe_use_global_keys ? true : false;
243
+
244
+ update_post_meta( $button_id, 'stripe_use_global_keys', $stripe_use_global_keys );
245
+
246
+ add_post_meta( $button_id, 'stripe_collect_address', isset( $_POST['collect_address'] ) ? '1' : '' );
247
+
248
+ add_post_meta( $button_id, 'return_url', trim( sanitize_text_field( $_REQUEST['return_url'] ) ) );
249
+ //add_post_meta($button_id, 'button_image_url', trim(sanitize_text_field($_REQUEST['button_image_url'])));
250
+ //Redirect to the edit interface of this button with $button_id
251
+ //$url = admin_url() . 'admin.php?page=simple_wp_membership_payments&tab=edit_button&button_id=' . $button_id . '&button_type=' . $button_type;
252
+ //Redirect to the manage payment buttons interface
253
+ $url = admin_url() . 'admin.php?page=simple_wp_membership_payments&tab=payment_buttons';
254
+ SwpmMiscUtils::redirect_to_url( $url );
255
+ }
256
+ }
257
+
258
+ /* * **********************************************************************
259
+ * End of new Stripe Buy now payment button stuff
260
+ * ********************************************************************** */
261
+
262
+
263
+ /* * ***************************************************************
264
+ * Render edit Stripe Buy now payment button interface
265
+ * ************************************************************** */
266
+ add_action( 'swpm_edit_payment_button_for_stripe_buy_now', 'swpm_edit_stripe_buy_now_button' );
267
+
268
+ function swpm_edit_stripe_buy_now_button() {
269
+
270
+ //Retrieve the payment button data and present it for editing.
271
+
272
+ $button_id = sanitize_text_field( $_REQUEST['button_id'] );
273
+ $button_id = absint( $button_id );
274
+ $button_type = sanitize_text_field( $_REQUEST['button_type'] );
275
+
276
+ $button = get_post( $button_id ); //Retrieve the CPT for this button
277
+
278
+ $membership_level_id = get_post_meta( $button_id, 'membership_level_id', true );
279
+ $payment_amount = get_post_meta( $button_id, 'payment_amount', true );
280
+ $payment_currency = get_post_meta( $button_id, 'payment_currency', true );
281
+
282
+ $stripe_test_secret_key = get_post_meta( $button_id, 'stripe_test_secret_key', true );
283
+ $stripe_test_publishable_key = get_post_meta( $button_id, 'stripe_test_publishable_key', true );
284
+ $stripe_live_secret_key = get_post_meta( $button_id, 'stripe_live_secret_key', true );
285
+ $stripe_live_publishable_key = get_post_meta( $button_id, 'stripe_live_publishable_key', true );
286
+
287
+ $collect_address = get_post_meta( $button_id, 'stripe_collect_address', true );
288
+ if ( $collect_address == '1' ) {
289
+ $collect_address = ' checked';
290
+ } else {
291
+ $collect_address = '';
292
+ }
293
+
294
+ $use_global_keys = get_post_meta( $button_id, 'stripe_use_global_keys', true );
295
+
296
+ $use_global_keys = empty( $use_global_keys ) ? false : true;
297
+
298
+ $return_url = get_post_meta( $button_id, 'return_url', true );
299
+ //$button_image_url = get_post_meta($button_id, 'button_image_url', true);
300
+ ?>
301
+ <div class="postbox">
302
+ <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Stripe Buy Now Button Configuration' ); ?></label></h3>
303
+ <div class="inside">
304
+
305
+ <form id="stripe_button_config_form" method="post">
306
+ <input type="hidden" name="button_type" value="<?php echo $button_type; ?>">
307
+
308
+ <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
309
+
310
+ <tr valign="top">
311
+ <th scope="row"><?php echo SwpmUtils::_( 'Button ID' ); ?></th>
312
+ <td>
313
+ <input type="text" size="10" name="button_id" value="<?php echo $button_id; ?>" readonly required />
314
+ <p class="description">This is the ID of this payment button. It is automatically generated for you and it cannot be changed.</p>
315
+ </td>
316
+ </tr>
317
+ <tr valign="top">
318
+ <th scope="row"><?php echo SwpmUtils::_( 'Button Title' ); ?></th>
319
+ <td>
320
+ <input type="text" size="50" name="button_name" value="<?php echo $button->post_title; ?>" required />
321
+ <p class="description">Give this membership payment button a name. Example: Gold membership payment</p>
322
+ </td>
323
+ </tr>
324
+ <tr valign="top">
325
+ <th scope="row"><?php echo SwpmUtils::_( 'Membership Level' ); ?></th>
326
+ <td>
327
+ <select id="membership_level_id" name="membership_level_id">
328
+ <?php echo SwpmUtils::membership_level_dropdown( $membership_level_id ); ?>
329
+ </select>
330
+ <p class="description">Select the membership level this payment button is for.</p>
331
+ </td>
332
+ </tr>
333
+ <tr valign="top">
334
+ <th scope="row"><?php echo SwpmUtils::_( 'Payment Amount' ); ?></th>
335
+ <td>
336
+ <input type="text" size="6" name="payment_amount" value="<?php echo $payment_amount; ?>" required />
337
+ <p class="description">Enter payment amount. Example values: 10.00 or 19.50 or 299.95 etc (do not put currency symbol).</p>
338
+ </td>
339
+ </tr>
340
+ <tr valign="top">
341
+ <th scope="row"><?php echo SwpmUtils::_( 'Payment Currency' ); ?></th>
342
+ <td>
343
+ <select id="payment_currency" name="payment_currency">
344
+ <option value="USD" <?php echo ( $payment_currency == 'USD' ) ? 'selected="selected"' : ''; ?>>US Dollars ($)</option>
345
+ <option value="EUR" <?php echo ( $payment_currency == 'EUR' ) ? 'selected="selected"' : ''; ?>>Euros (€)</option>
346
+ <option value="GBP" <?php echo ( $payment_currency == 'GBP' ) ? 'selected="selected"' : ''; ?>>Pounds Sterling (£)</option>
347
+ <option value="AUD" <?php echo ( $payment_currency == 'AUD' ) ? 'selected="selected"' : ''; ?>>Australian Dollars ($)</option>
348
+ <option value="BRL" <?php echo ( $payment_currency == 'BRL' ) ? 'selected="selected"' : ''; ?>>Brazilian Real (R$)</option>
349
+ <option value="CAD" <?php echo ( $payment_currency == 'CAD' ) ? 'selected="selected"' : ''; ?>>Canadian Dollars ($)</option>
350
+ <option value="CNY" <?php echo ( $payment_currency == 'CNY' ) ? 'selected="selected"' : ''; ?>>Chinese Yuan</option>
351
+ <option value="CZK" <?php echo ( $payment_currency == 'CZK' ) ? 'selected="selected"' : ''; ?>>Czech Koruna</option>
352
+ <option value="DKK" <?php echo ( $payment_currency == 'DKK' ) ? 'selected="selected"' : ''; ?>>Danish Krone</option>
353
+ <option value="HKD" <?php echo ( $payment_currency == 'HKD' ) ? 'selected="selected"' : ''; ?>>Hong Kong Dollar ($)</option>
354
+ <option value="HUF" <?php echo ( $payment_currency == 'HUF' ) ? 'selected="selected"' : ''; ?>>Hungarian Forint</option>
355
+ <option value="INR" <?php echo ( $payment_currency == 'INR' ) ? 'selected="selected"' : ''; ?>>Indian Rupee</option>
356
+ <option value="IDR" <?php echo ( $payment_currency == 'IDR' ) ? 'selected="selected"' : ''; ?>>Indonesia Rupiah</option>
357
+ <option value="ILS" <?php echo ( $payment_currency == 'ILS' ) ? 'selected="selected"' : ''; ?>>Israeli Shekel</option>
358
+ <option value="JPY" <?php echo ( $payment_currency == 'JPY' ) ? 'selected="selected"' : ''; ?>>Japanese Yen (¥)</option>
359
+ <option value="MYR" <?php echo ( $payment_currency == 'MYR' ) ? 'selected="selected"' : ''; ?>>Malaysian Ringgits</option>
360
+ <option value="MXN" <?php echo ( $payment_currency == 'MXN' ) ? 'selected="selected"' : ''; ?>>Mexican Peso ($)</option>
361
+ <option value="NZD" <?php echo ( $payment_currency == 'NZD' ) ? 'selected="selected"' : ''; ?>>New Zealand Dollar ($)</option>
362
+ <option value="NOK" <?php echo ( $payment_currency == 'NOK' ) ? 'selected="selected"' : ''; ?>>Norwegian Krone</option>
363
+ <option value="PHP" <?php echo ( $payment_currency == 'PHP' ) ? 'selected="selected"' : ''; ?>>Philippine Pesos</option>
364
+ <option value="PLN" <?php echo ( $payment_currency == 'PLN' ) ? 'selected="selected"' : ''; ?>>Polish Zloty</option>
365
+ <option value="SGD" <?php echo ( $payment_currency == 'SGD' ) ? 'selected="selected"' : ''; ?>>Singapore Dollar ($)</option>
366
+ <option value="ZAR" <?php echo ( $payment_currency == 'ZAR' ) ? 'selected="selected"' : ''; ?>>South African Rand (R)</option>
367
+ <option value="KRW" <?php echo ( $payment_currency == 'KRW' ) ? 'selected="selected"' : ''; ?>>South Korean Won</option>
368
+ <option value="SEK" <?php echo ( $payment_currency == 'SEK' ) ? 'selected="selected"' : ''; ?>>Swedish Krona</option>
369
+ <option value="CHF" <?php echo ( $payment_currency == 'CHF' ) ? 'selected="selected"' : ''; ?>>Swiss Franc</option>
370
+ <option value="TWD" <?php echo ( $payment_currency == 'TWD' ) ? 'selected="selected"' : ''; ?>>Taiwan New Dollars</option>
371
+ <option value="THB" <?php echo ( $payment_currency == 'THB' ) ? 'selected="selected"' : ''; ?>>Thai Baht</option>
372
+ <option value="TRY" <?php echo ( $payment_currency == 'TRY' ) ? 'selected="selected"' : ''; ?>>Turkish Lira</option>
373
+ <option value="VND" <?php echo ( $payment_currency == 'VND' ) ? 'selected="selected"' : ''; ?>>Vietnamese Dong</option>
374
+ </select>
375
+ <p class="description">Select the currency for this payment button.</p>
376
+ </td>
377
+ </tr>
378
+
379
+ <tr valign="top">
380
+ <th colspan="2">
381
+ <div class="swpm-grey-box"><?php echo SwpmUtils::_( 'Stripe API keys. You can get this from your Stripe account.' ); ?></div>
382
+ </th>
383
+ </tr>
384
+
385
+ <tr valign="top">
386
+ <th scope="row"><?php echo SwpmUtils::_( 'Use Global API Keys Settings' ); ?></th>
387
+ <td>
388
+ <input type="checkbox" name="stripe_use_global_keys" value="1" <?php echo $use_global_keys ? ' checked' : ''; ?> />
389
+ <p class="description"><?php echo SwpmUtils::_( 'Use API keys from <a href="admin.php?page=simple_wp_membership_settings&tab=2" target="_blank">Payment Settings</a> tab.' ); ?></p>
390
+ </td>
391
+ </tr>
392
+
393
+ <tr valign="top">
394
+ <th scope="row"><?php echo SwpmUtils::_( 'Test Publishable Key' ); ?></th>
395
+ <td>
396
+ <input type="text" size="50" name="stripe_test_publishable_key" value="<?php echo $stripe_test_publishable_key; ?>" required />
397
+ <p class="description">Enter your Stripe test publishable key.</p>
398
+ </td>
399
+ </tr>
400
+ <tr valign="top">
401
+ <th scope="row"><?php echo SwpmUtils::_( 'Test Secret Key' ); ?></th>
402
+ <td>
403
+ <input type="text" size="50" name="stripe_test_secret_key" value="<?php echo $stripe_test_secret_key; ?>" required />
404
+ <p class="description">Enter your Stripe test secret key.</p>
405
+ </td>
406
+ </tr>
407
+ <tr valign="top">
408
+ <th scope="row"><?php echo SwpmUtils::_( 'Live Publishable Key' ); ?></th>
409
+ <td>
410
+ <input type="text" size="50" name="stripe_live_publishable_key" value="<?php echo $stripe_live_publishable_key; ?>" required />
411
+ <p class="description">Enter your Stripe live publishable key.</p>
412
+ </td>
413
+ </tr>
414
+ <tr valign="top">
415
+ <th scope="row"><?php echo SwpmUtils::_( 'Live Secret Key' ); ?></th>
416
+ <td>
417
+ <input type="text" size="50" name="stripe_live_secret_key" value="<?php echo $stripe_live_secret_key; ?>" required />
418
+ <p class="description">Enter your Stripe live secret key.</p>
419
+ </td>
420
+ </tr>
421
+
422
+ <tr valign="top">
423
+ <th colspan="2">
424
+ <div class="swpm-grey-box"><?php echo SwpmUtils::_( 'The following details are optional.' ); ?></div>
425
+ </th>
426
+ </tr>
427
+
428
+ <tr valign="top">
429
+ <th scope="row"><?php echo SwpmUtils::_( 'Collect Customer Address' ); ?></th>
430
+ <td>
431
+ <input type="checkbox" name="collect_address" value="1" <?php echo $collect_address; ?> />
432
+ <p class="description">Enable this option if you want to collect customer address during Stripe checkout.</p>
433
+ </td>
434
+ </tr>
435
+
436
+ <tr valign="top">
437
+ <th scope="row"><?php echo SwpmUtils::_( 'Return URL' ); ?></th>
438
+ <td>
439
+ <input type="text" size="100" name="return_url" value="<?php echo $return_url; ?>" />
440
+ <p class="description">This is the URL the user will be redirected to after a successful payment. Enter the URL of your Thank You page here.</p>
441
+ </td>
442
+ </tr>
443
+
444
+ </table>
445
+
446
+ <script>
447
+ var swpmInputsArr = ['stripe_test_publishable_key', 'stripe_test_secret_key', 'stripe_live_publishable_key', 'stripe_live_secret_key'];
448
+ jQuery('input[name="stripe_use_global_keys"').change(function() {
449
+ var checked = jQuery(this).prop('checked');
450
+ jQuery.each(swpmInputsArr, function(index, el) {
451
+ jQuery('input[name="' + el + '"]').prop('disabled', checked);
452
+ });
453
+ });
454
+ jQuery('input[name="stripe_use_global_keys"').trigger('change');
455
+ </script>
456
+
457
+ <p class="submit">
458
+ <?php wp_nonce_field( 'swpm_admin_add_edit_stripe_buy_now_btn', 'swpm_admin_edit_stripe_buy_now_btn' ); ?>
459
+ <input type="submit" name="swpm_stripe_buy_now_edit_submit" class="button-primary" value="<?php echo SwpmUtils::_( 'Save Payment Data' ); ?>">
460
+ </p>
461
+
462
+ </form>
463
+
464
+ </div>
465
+ </div>
466
+ <?php
467
+ }
468
+
469
+ /*
470
+ * Process submission and save the edited Stripe Buy now payment button data
471
+ */
472
+ add_action( 'swpm_edit_payment_button_process_submission', 'swpm_edit_stripe_buy_now_button_data' );
473
+
474
+ function swpm_edit_stripe_buy_now_button_data() {
475
+ if ( isset( $_REQUEST['swpm_stripe_buy_now_edit_submit'] ) ) {
476
+ //This is a Stripe buy now button edit event. Process the submission.
477
+ check_admin_referer( 'swpm_admin_add_edit_stripe_buy_now_btn', 'swpm_admin_edit_stripe_buy_now_btn' );
478
+ //Update and Save the edited payment button data
479
+ $button_id = sanitize_text_field( $_REQUEST['button_id'] );
480
+ $button_id = absint( $button_id );
481
+ $button_type = sanitize_text_field( $_REQUEST['button_type'] );
482
+ $button_name = sanitize_text_field( $_REQUEST['button_name'] );
483
+
484
+ $button_post = array(
485
+ 'ID' => $button_id,
486
+ 'post_title' => $button_name,
487
+ 'post_type' => 'swpm_payment_button',
488
+ );
489
+ wp_update_post( $button_post );
490
+
491
+ update_post_meta( $button_id, 'button_type', $button_type );
492
+ update_post_meta( $button_id, 'membership_level_id', sanitize_text_field( $_REQUEST['membership_level_id'] ) );
493
+ update_post_meta( $button_id, 'payment_amount', trim( sanitize_text_field( $_REQUEST['payment_amount'] ) ) );
494
+ update_post_meta( $button_id, 'payment_currency', sanitize_text_field( $_REQUEST['payment_currency'] ) );
495
+
496
+ $stripe_test_secret_key = filter_input( INPUT_POST, 'stripe_test_secret_key', FILTER_SANITIZE_STRING );
497
+ $stripe_test_publishable_key = filter_input( INPUT_POST, 'stripe_test_publishable_key', FILTER_SANITIZE_STRING );
498
+
499
+ if ( ! is_null( $stripe_test_secret_key ) ) {
500
+ update_post_meta( $button_id, 'stripe_test_secret_key', trim( $stripe_test_secret_key ) );
501
+ }
502
+
503
+ if ( ! is_null( $stripe_test_publishable_key ) ) {
504
+ update_post_meta( $button_id, 'stripe_test_publishable_key', trim( $stripe_test_publishable_key ) );
505
+ }
506
+
507
+ $stripe_live_secret_key = filter_input( INPUT_POST, 'stripe_live_secret_key', FILTER_SANITIZE_STRING );
508
+ $stripe_live_publishable_key = filter_input( INPUT_POST, 'stripe_live_publishable_key', FILTER_SANITIZE_STRING );
509
+
510
+ if ( ! is_null( $stripe_live_secret_key ) ) {
511
+ update_post_meta( $button_id, 'stripe_live_secret_key', trim( $stripe_live_secret_key ) );
512
+ }
513
+
514
+ if ( ! is_null( $stripe_live_publishable_key ) ) {
515
+ update_post_meta( $button_id, 'stripe_live_publishable_key', trim( $stripe_live_publishable_key ) );
516
+ }
517
+
518
+ update_post_meta( $button_id, 'stripe_collect_address', isset( $_POST['collect_address'] ) ? '1' : '' );
519
+
520
+ $stripe_use_global_keys = filter_input( INPUT_POST, 'stripe_use_global_keys', FILTER_SANITIZE_NUMBER_INT );
521
+ $stripe_use_global_keys = $stripe_use_global_keys ? true : false;
522
+
523
+ update_post_meta( $button_id, 'stripe_use_global_keys', $stripe_use_global_keys );
524
+
525
+ update_post_meta( $button_id, 'stripe_collect_address', isset( $_POST['collect_address'] ) ? '1' : '' );
526
+
527
+ update_post_meta( $button_id, 'return_url', trim( sanitize_text_field( $_REQUEST['return_url'] ) ) );
528
+ //update_post_meta($button_id, 'button_image_url', trim(sanitize_text_field($_REQUEST['button_image_url'])));
529
+
530
+ echo '<div id="message" class="updated fade"><p>Payment button data successfully updated!</p></div>';
531
+ }
532
+ }
533
+
534
+ /************************************************************************
535
+ * End of edit Stripe Buy now payment button stuff
536
+ ************************************************************************/
views/payments/payment-gateway/admin_stripe_sca_buy_now_button.php CHANGED
@@ -20,150 +20,173 @@ function swpm_create_new_stripe_sca_buy_now_button() {
20
  }
21
  ?>
22
 
23
- <div class="swpm-orange-box">
24
- View the <a target="_blank" href="https://simple-membership-plugin.com/create-stripe-buy-now-button-for-membership-payment/">documentation</a>&nbsp;
25
- to learn how to create a Stripe Buy Now payment button and use it.
26
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
- <div class="postbox">
29
- <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Stripe SCA Buy Now Button Configuration' ); ?></label></h3>
30
- <div class="inside">
31
-
32
- <form id="stripe_button_config_form" method="post">
33
- <input type="hidden" name="button_type" value="<?php echo sanitize_text_field( $_REQUEST['button_type'] ); ?>">
34
- <input type="hidden" name="swpm_button_type_selected" value="1">
35
-
36
- <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
37
-
38
- <tr valign="top">
39
- <th scope="row"><?php echo SwpmUtils::_( 'Button Title' ); ?></th>
40
- <td>
41
- <input type="text" size="50" name="button_name" value="" required />
42
- <p class="description">Give this membership payment button a name. Example: Gold membership payment</p>
43
- </td>
44
- </tr>
45
-
46
- <tr valign="top">
47
- <th scope="row"><?php echo SwpmUtils::_( 'Membership Level' ); ?></th>
48
- <td>
49
- <select id="membership_level_id" name="membership_level_id">
50
- <?php echo SwpmUtils::membership_level_dropdown(); ?>
51
- </select>
52
- <p class="description">Select the membership level this payment button is for.</p>
53
- </td>
54
- </tr>
55
-
56
- <tr valign="top">
57
- <th scope="row"><?php echo SwpmUtils::_( 'Payment Amount' ); ?></th>
58
- <td>
59
- <input type="text" size="6" name="payment_amount" value="" required />
60
- <p class="description">Enter payment amount. Example values: 10.00 or 19.50 or 299.95 etc (do not put currency symbol).</p>
61
- </td>
62
- </tr>
63
-
64
- <tr valign="top">
65
- <th scope="row"><?php echo SwpmUtils::_( 'Payment Currency' ); ?></th>
66
- <td>
67
- <select id="payment_currency" name="payment_currency">
68
- <option selected="selected" value="USD">US Dollars ($)</option>
69
- <option value="EUR">Euros (€)</option>
70
- <option value="GBP">Pounds Sterling (£)</option>
71
- <option value="AUD">Australian Dollars ($)</option>
72
- <option value="BRL">Brazilian Real (R$)</option>
73
- <option value="CAD">Canadian Dollars ($)</option>
74
- <option value="CNY">Chinese Yuan</option>
75
- <option value="CZK">Czech Koruna</option>
76
- <option value="DKK">Danish Krone</option>
77
- <option value="HKD">Hong Kong Dollar ($)</option>
78
- <option value="HUF">Hungarian Forint</option>
79
- <option value="INR">Indian Rupee</option>
80
- <option value="IDR">Indonesia Rupiah</option>
81
- <option value="ILS">Israeli Shekel</option>
82
- <option value="JPY">Japanese Yen (¥)</option>
83
- <option value="MYR">Malaysian Ringgits</option>
84
- <option value="MXN">Mexican Peso ($)</option>
85
- <option value="NZD">New Zealand Dollar ($)</option>
86
- <option value="NOK">Norwegian Krone</option>
87
- <option value="PHP">Philippine Pesos</option>
88
- <option value="PLN">Polish Zloty</option>
89
- <option value="SGD">Singapore Dollar ($)</option>
90
- <option value="ZAR">South African Rand (R)</option>
91
- <option value="KRW">South Korean Won</option>
92
- <option value="SEK">Swedish Krona</option>
93
- <option value="CHF">Swiss Franc</option>
94
- <option value="TWD">Taiwan New Dollars</option>
95
- <option value="THB">Thai Baht</option>
96
- <option value="TRY">Turkish Lira</option>
97
- <option value="VND">Vietnamese Dong</option>
98
- </select>
99
- <p class="description">Select the currency for this payment button.</p>
100
- </td>
101
- </tr>
102
-
103
- <tr valign="top">
104
- <th colspan="2"><div class="swpm-grey-box"><?php echo SwpmUtils::_( 'Stripe API keys. You can get this from your Stripe account.' ); ?></div></th>
105
- </tr>
106
-
107
- <tr valign="top">
108
- <th scope="row"><?php echo SwpmUtils::_( 'Test Publishable Key' ); ?></th>
109
- <td>
110
- <input type="text" size="50" name="stripe_test_publishable_key" value="" required />
111
- <p class="description">Enter your Stripe test publishable key.</p>
112
- </td>
113
- </tr>
114
- <tr valign="top">
115
- <th scope="row"><?php echo SwpmUtils::_( 'Test Secret Key' ); ?></th>
116
- <td>
117
- <input type="text" size="50" name="stripe_test_secret_key" value="" required />
118
- <p class="description">Enter your Stripe test secret key.</p>
119
- </td>
120
- </tr>
121
- <tr valign="top">
122
- <th scope="row"><?php echo SwpmUtils::_( 'Live Publishable Key' ); ?></th>
123
- <td>
124
- <input type="text" size="50" name="stripe_live_publishable_key" value="" required />
125
- <p class="description">Enter your Stripe live publishable key.</p>
126
- </td>
127
- </tr>
128
- <tr valign="top">
129
- <th scope="row"><?php echo SwpmUtils::_( 'Live Secret Key' ); ?></th>
130
- <td>
131
- <input type="text" size="50" name="stripe_live_secret_key" value="" required />
132
- <p class="description">Enter your Stripe live secret key.</p>
133
- </td>
134
- </tr>
135
-
136
- <tr valign="top">
137
- <th colspan="2"><div class="swpm-grey-box"><?php echo SwpmUtils::_( 'The following details are optional.' ); ?></div></th>
138
- </tr>
139
-
140
- <tr valign="top">
141
- <th scope="row"><?php echo SwpmUtils::_( 'Collect Customer Address' ); ?></th>
142
- <td>
143
- <input type="checkbox" name="collect_address" value="1"/>
144
- <p class="description">Enable this option if you want to collect customer address during Stripe checkout.</p>
145
- </td>
146
- </tr>
147
-
148
- <tr valign="top">
149
- <th scope="row"><?php echo SwpmUtils::_( 'Return URL' ); ?></th>
150
- <td>
151
- <input type="text" size="100" name="return_url" value="" />
152
- <p class="description">This is the URL the user will be redirected to after a successful payment. Enter the URL of your Thank You page here.</p>
153
- </td>
154
- </tr>
155
-
156
- </table>
157
-
158
- <p class="submit">
159
- <?php wp_nonce_field( 'swpm_admin_add_edit_stripe_sca_buy_now_btn', 'swpm_admin_create_stripe_sca_buy_now_btn' ); ?>
160
- <input type="submit" name="swpm_stripe_sca_buy_now_save_submit" class="button-primary" value="<?php echo SwpmUtils::_( 'Save Payment Data' ); ?>" >
161
- </p>
162
-
163
- </form>
164
-
165
- </div>
166
  </div>
 
167
  <?php
168
  }
169
 
@@ -200,6 +223,10 @@ function swpm_save_new_stripe_sca_buy_now_button_data() {
200
 
201
  add_post_meta( $button_id, 'stripe_collect_address', isset( $_POST['collect_address'] ) ? '1' : '' );
202
 
 
 
 
 
203
  add_post_meta( $button_id, 'return_url', trim( sanitize_text_field( $_REQUEST['return_url'] ) ) );
204
  //add_post_meta($button_id, 'button_image_url', trim(sanitize_text_field($_REQUEST['button_image_url'])));
205
  //Redirect to the edit interface of this button with $button_id
@@ -246,151 +273,178 @@ function swpm_edit_stripe_sca_buy_now_button() {
246
  $collect_address = '';
247
  }
248
 
 
 
 
 
249
  $return_url = get_post_meta( $button_id, 'return_url', true );
250
  //$button_image_url = get_post_meta($button_id, 'button_image_url', true);
251
  ?>
252
- <div class="postbox">
253
- <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Stripe Buy Now Button Configuration' ); ?></label></h3>
254
- <div class="inside">
255
-
256
- <form id="stripe_button_config_form" method="post">
257
- <input type="hidden" name="button_type" value="<?php echo $button_type; ?>">
258
-
259
- <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
260
-
261
- <tr valign="top">
262
- <th scope="row"><?php echo SwpmUtils::_( 'Button ID' ); ?></th>
263
- <td>
264
- <input type="text" size="10" name="button_id" value="<?php echo $button_id; ?>" readonly required />
265
- <p class="description">This is the ID of this payment button. It is automatically generated for you and it cannot be changed.</p>
266
- </td>
267
- </tr>
268
- <tr valign="top">
269
- <th scope="row"><?php echo SwpmUtils::_( 'Button Title' ); ?></th>
270
- <td>
271
- <input type="text" size="50" name="button_name" value="<?php echo $button->post_title; ?>" required />
272
- <p class="description">Give this membership payment button a name. Example: Gold membership payment</p>
273
- </td>
274
- </tr>
275
- <tr valign="top">
276
- <th scope="row"><?php echo SwpmUtils::_( 'Membership Level' ); ?></th>
277
- <td>
278
- <select id="membership_level_id" name="membership_level_id">
279
- <?php echo SwpmUtils::membership_level_dropdown( $membership_level_id ); ?>
280
- </select>
281
- <p class="description">Select the membership level this payment button is for.</p>
282
- </td>
283
- </tr>
284
- <tr valign="top">
285
- <th scope="row"><?php echo SwpmUtils::_( 'Payment Amount' ); ?></th>
286
- <td>
287
- <input type="text" size="6" name="payment_amount" value="<?php echo $payment_amount; ?>" required />
288
- <p class="description">Enter payment amount. Example values: 10.00 or 19.50 or 299.95 etc (do not put currency symbol).</p>
289
- </td>
290
- </tr>
291
- <tr valign="top">
292
- <th scope="row"><?php echo SwpmUtils::_( 'Payment Currency' ); ?></th>
293
- <td>
294
- <select id="payment_currency" name="payment_currency">
295
- <option value="USD" <?php echo ( $payment_currency == 'USD' ) ? 'selected="selected"' : ''; ?>>US Dollars ($)</option>
296
- <option value="EUR" <?php echo ( $payment_currency == 'EUR' ) ? 'selected="selected"' : ''; ?>>Euros (€)</option>
297
- <option value="GBP" <?php echo ( $payment_currency == 'GBP' ) ? 'selected="selected"' : ''; ?>>Pounds Sterling (£)</option>
298
- <option value="AUD" <?php echo ( $payment_currency == 'AUD' ) ? 'selected="selected"' : ''; ?>>Australian Dollars ($)</option>
299
- <option value="BRL" <?php echo ( $payment_currency == 'BRL' ) ? 'selected="selected"' : ''; ?>>Brazilian Real (R$)</option>
300
- <option value="CAD" <?php echo ( $payment_currency == 'CAD' ) ? 'selected="selected"' : ''; ?>>Canadian Dollars ($)</option>
301
- <option value="CNY" <?php echo ( $payment_currency == 'CNY' ) ? 'selected="selected"' : ''; ?>>Chinese Yuan</option>
302
- <option value="CZK" <?php echo ( $payment_currency == 'CZK' ) ? 'selected="selected"' : ''; ?>>Czech Koruna</option>
303
- <option value="DKK" <?php echo ( $payment_currency == 'DKK' ) ? 'selected="selected"' : ''; ?>>Danish Krone</option>
304
- <option value="HKD" <?php echo ( $payment_currency == 'HKD' ) ? 'selected="selected"' : ''; ?>>Hong Kong Dollar ($)</option>
305
- <option value="HUF" <?php echo ( $payment_currency == 'HUF' ) ? 'selected="selected"' : ''; ?>>Hungarian Forint</option>
306
- <option value="INR" <?php echo ( $payment_currency == 'INR' ) ? 'selected="selected"' : ''; ?>>Indian Rupee</option>
307
- <option value="IDR" <?php echo ( $payment_currency == 'IDR' ) ? 'selected="selected"' : ''; ?>>Indonesia Rupiah</option>
308
- <option value="ILS" <?php echo ( $payment_currency == 'ILS' ) ? 'selected="selected"' : ''; ?>>Israeli Shekel</option>
309
- <option value="JPY" <?php echo ( $payment_currency == 'JPY' ) ? 'selected="selected"' : ''; ?>>Japanese Yen (¥)</option>
310
- <option value="MYR" <?php echo ( $payment_currency == 'MYR' ) ? 'selected="selected"' : ''; ?>>Malaysian Ringgits</option>
311
- <option value="MXN" <?php echo ( $payment_currency == 'MXN' ) ? 'selected="selected"' : ''; ?>>Mexican Peso ($)</option>
312
- <option value="NZD" <?php echo ( $payment_currency == 'NZD' ) ? 'selected="selected"' : ''; ?>>New Zealand Dollar ($)</option>
313
- <option value="NOK" <?php echo ( $payment_currency == 'NOK' ) ? 'selected="selected"' : ''; ?>>Norwegian Krone</option>
314
- <option value="PHP" <?php echo ( $payment_currency == 'PHP' ) ? 'selected="selected"' : ''; ?>>Philippine Pesos</option>
315
- <option value="PLN" <?php echo ( $payment_currency == 'PLN' ) ? 'selected="selected"' : ''; ?>>Polish Zloty</option>
316
- <option value="SGD" <?php echo ( $payment_currency == 'SGD' ) ? 'selected="selected"' : ''; ?>>Singapore Dollar ($)</option>
317
- <option value="ZAR" <?php echo ( $payment_currency == 'ZAR' ) ? 'selected="selected"' : ''; ?>>South African Rand (R)</option>
318
- <option value="KRW" <?php echo ( $payment_currency == 'KRW' ) ? 'selected="selected"' : ''; ?>>South Korean Won</option>
319
- <option value="SEK" <?php echo ( $payment_currency == 'SEK' ) ? 'selected="selected"' : ''; ?>>Swedish Krona</option>
320
- <option value="CHF" <?php echo ( $payment_currency == 'CHF' ) ? 'selected="selected"' : ''; ?>>Swiss Franc</option>
321
- <option value="TWD" <?php echo ( $payment_currency == 'TWD' ) ? 'selected="selected"' : ''; ?>>Taiwan New Dollars</option>
322
- <option value="THB" <?php echo ( $payment_currency == 'THB' ) ? 'selected="selected"' : ''; ?>>Thai Baht</option>
323
- <option value="TRY" <?php echo ( $payment_currency == 'TRY' ) ? 'selected="selected"' : ''; ?>>Turkish Lira</option>
324
- <option value="VND" <?php echo ( $payment_currency == 'VND' ) ? 'selected="selected"' : ''; ?>>Vietnamese Dong</option>
325
- </select>
326
- <p class="description">Select the currency for this payment button.</p>
327
- </td>
328
- </tr>
329
-
330
- <tr valign="top">
331
- <th colspan="2"><div class="swpm-grey-box"><?php echo SwpmUtils::_( 'Stripe API keys. You can get this from your Stripe account.' ); ?></div></th>
332
- </tr>
333
-
334
- <tr valign="top">
335
- <th scope="row"><?php echo SwpmUtils::_( 'Test Publishable Key' ); ?></th>
336
- <td>
337
- <input type="text" size="50" name="stripe_test_publishable_key" value="<?php echo $stripe_test_publishable_key; ?>" required />
338
- <p class="description">Enter your Stripe test publishable key.</p>
339
- </td>
340
- </tr>
341
- <tr valign="top">
342
- <th scope="row"><?php echo SwpmUtils::_( 'Test Secret Key' ); ?></th>
343
- <td>
344
- <input type="text" size="50" name="stripe_test_secret_key" value="<?php echo $stripe_test_secret_key; ?>" required />
345
- <p class="description">Enter your Stripe test secret key.</p>
346
- </td>
347
- </tr>
348
- <tr valign="top">
349
- <th scope="row"><?php echo SwpmUtils::_( 'Live Publishable Key' ); ?></th>
350
- <td>
351
- <input type="text" size="50" name="stripe_live_publishable_key" value="<?php echo $stripe_live_publishable_key; ?>" required />
352
- <p class="description">Enter your Stripe live publishable key.</p>
353
- </td>
354
- </tr>
355
- <tr valign="top">
356
- <th scope="row"><?php echo SwpmUtils::_( 'Live Secret Key' ); ?></th>
357
- <td>
358
- <input type="text" size="50" name="stripe_live_secret_key" value="<?php echo $stripe_live_secret_key; ?>" required />
359
- <p class="description">Enter your Stripe live secret key.</p>
360
- </td>
361
- </tr>
362
-
363
- <tr valign="top">
364
- <th colspan="2"><div class="swpm-grey-box"><?php echo SwpmUtils::_( 'The following details are optional.' ); ?></div></th>
365
- </tr>
366
-
367
- <tr valign="top">
368
- <th scope="row"><?php echo SwpmUtils::_( 'Collect Customer Address' ); ?></th>
369
- <td>
370
- <input type="checkbox" name="collect_address" value="1"<?php echo $collect_address; ?>/>
371
- <p class="description">Enable this option if you want to collect customer address during Stripe checkout.</p>
372
- </td>
373
- </tr>
374
-
375
- <tr valign="top">
376
- <th scope="row"><?php echo SwpmUtils::_( 'Return URL' ); ?></th>
377
- <td>
378
- <input type="text" size="100" name="return_url" value="<?php echo $return_url; ?>" />
379
- <p class="description">This is the URL the user will be redirected to after a successful payment. Enter the URL of your Thank You page here.</p>
380
- </td>
381
- </tr>
382
-
383
- </table>
384
-
385
- <p class="submit">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
  <?php wp_nonce_field( 'swpm_admin_add_edit_stripe_sca_buy_now_btn', 'swpm_admin_edit_stripe_sca_buy_now_btn' ); ?>
387
- <input type="submit" name="swpm_stripe_sca_buy_now_edit_submit" class="button-primary" value="<?php echo SwpmUtils::_( 'Save Payment Data' ); ?>" >
388
- </p>
389
 
390
- </form>
391
 
392
- </div>
393
  </div>
 
394
  <?php
395
  }
396
 
@@ -421,13 +475,35 @@ function swpm_edit_stripe_sca_buy_now_button_data() {
421
  update_post_meta( $button_id, 'payment_amount', trim( sanitize_text_field( $_REQUEST['payment_amount'] ) ) );
422
  update_post_meta( $button_id, 'payment_currency', sanitize_text_field( $_REQUEST['payment_currency'] ) );
423
 
424
- update_post_meta( $button_id, 'stripe_test_secret_key', trim( sanitize_text_field( $_REQUEST['stripe_test_secret_key'] ) ) );
425
- update_post_meta( $button_id, 'stripe_test_publishable_key', trim( sanitize_text_field( $_REQUEST['stripe_test_publishable_key'] ) ) );
426
- update_post_meta( $button_id, 'stripe_live_secret_key', trim( sanitize_text_field( $_REQUEST['stripe_live_secret_key'] ) ) );
427
- update_post_meta( $button_id, 'stripe_live_publishable_key', trim( sanitize_text_field( $_REQUEST['stripe_live_publishable_key'] ) ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
 
429
  update_post_meta( $button_id, 'stripe_collect_address', isset( $_POST['collect_address'] ) ? '1' : '' );
430
 
 
 
 
 
 
431
  update_post_meta( $button_id, 'return_url', trim( sanitize_text_field( $_REQUEST['return_url'] ) ) );
432
  //update_post_meta($button_id, 'button_image_url', trim(sanitize_text_field($_REQUEST['button_image_url'])));
433
 
20
  }
21
  ?>
22
 
23
+ <div class="swpm-orange-box">
24
+ View the <a target="_blank" href="https://simple-membership-plugin.com/sca-compliant-stripe-buy-now-button/">documentation</a>&nbsp;
25
+ to learn how to create a Stripe Buy Now payment button and use it.
26
+ </div>
27
+
28
+ <div class="postbox">
29
+ <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Stripe SCA Buy Now Button Configuration' ); ?></label></h3>
30
+ <div class="inside">
31
+
32
+ <form id="stripe_button_config_form" method="post">
33
+ <input type="hidden" name="button_type" value="<?php echo sanitize_text_field( $_REQUEST['button_type'] ); ?>">
34
+ <input type="hidden" name="swpm_button_type_selected" value="1">
35
+
36
+ <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
37
+
38
+ <tr valign="top">
39
+ <th scope="row"><?php echo SwpmUtils::_( 'Button Title' ); ?></th>
40
+ <td>
41
+ <input type="text" size="50" name="button_name" value="" required />
42
+ <p class="description">Give this membership payment button a name. Example: Gold membership payment</p>
43
+ </td>
44
+ </tr>
45
+
46
+ <tr valign="top">
47
+ <th scope="row"><?php echo SwpmUtils::_( 'Membership Level' ); ?></th>
48
+ <td>
49
+ <select id="membership_level_id" name="membership_level_id">
50
+ <?php echo SwpmUtils::membership_level_dropdown(); ?>
51
+ </select>
52
+ <p class="description">Select the membership level this payment button is for.</p>
53
+ </td>
54
+ </tr>
55
+
56
+ <tr valign="top">
57
+ <th scope="row"><?php echo SwpmUtils::_( 'Payment Amount' ); ?></th>
58
+ <td>
59
+ <input type="text" size="6" name="payment_amount" value="" required />
60
+ <p class="description">Enter payment amount. Example values: 10.00 or 19.50 or 299.95 etc (do not put currency symbol).</p>
61
+ </td>
62
+ </tr>
63
+
64
+ <tr valign="top">
65
+ <th scope="row"><?php echo SwpmUtils::_( 'Payment Currency' ); ?></th>
66
+ <td>
67
+ <select id="payment_currency" name="payment_currency">
68
+ <option selected="selected" value="USD">US Dollars ($)</option>
69
+ <option value="EUR">Euros (€)</option>
70
+ <option value="GBP">Pounds Sterling (£)</option>
71
+ <option value="AUD">Australian Dollars ($)</option>
72
+ <option value="BRL">Brazilian Real (R$)</option>
73
+ <option value="CAD">Canadian Dollars ($)</option>
74
+ <option value="CNY">Chinese Yuan</option>
75
+ <option value="CZK">Czech Koruna</option>
76
+ <option value="DKK">Danish Krone</option>
77
+ <option value="HKD">Hong Kong Dollar ($)</option>
78
+ <option value="HUF">Hungarian Forint</option>
79
+ <option value="INR">Indian Rupee</option>
80
+ <option value="IDR">Indonesia Rupiah</option>
81
+ <option value="ILS">Israeli Shekel</option>
82
+ <option value="JPY">Japanese Yen (¥)</option>
83
+ <option value="MYR">Malaysian Ringgits</option>
84
+ <option value="MXN">Mexican Peso ($)</option>
85
+ <option value="NZD">New Zealand Dollar ($)</option>
86
+ <option value="NOK">Norwegian Krone</option>
87
+ <option value="PHP">Philippine Pesos</option>
88
+ <option value="PLN">Polish Zloty</option>
89
+ <option value="SGD">Singapore Dollar ($)</option>
90
+ <option value="ZAR">South African Rand (R)</option>
91
+ <option value="KRW">South Korean Won</option>
92
+ <option value="SEK">Swedish Krona</option>
93
+ <option value="CHF">Swiss Franc</option>
94
+ <option value="TWD">Taiwan New Dollars</option>
95
+ <option value="THB">Thai Baht</option>
96
+ <option value="TRY">Turkish Lira</option>
97
+ <option value="VND">Vietnamese Dong</option>
98
+ </select>
99
+ <p class="description">Select the currency for this payment button.</p>
100
+ </td>
101
+ </tr>
102
+
103
+ <tr valign="top">
104
+ <th colspan="2">
105
+ <div class="swpm-grey-box"><?php echo SwpmUtils::_( 'Stripe API keys. You can get this from your Stripe account.' ); ?></div>
106
+ </th>
107
+ </tr>
108
+
109
+ <tr valign="top">
110
+ <th scope="row"><?php echo SwpmUtils::_( 'Use Global API Keys Settings' ); ?></th>
111
+ <td>
112
+ <input type="checkbox" name="stripe_use_global_keys" value="1" checked/>
113
+ <p class="description"><?php echo SwpmUtils::_( 'Use API keys from <a href="admin.php?page=simple_wp_membership_settings&tab=2" target="_blank">Payment Settings</a> tab.' ); ?></p>
114
+ </td>
115
+ </tr>
116
+
117
+ <tr valign="top">
118
+ <th scope="row"><?php echo SwpmUtils::_( 'Test Publishable Key' ); ?></th>
119
+ <td>
120
+ <input type="text" size="50" name="stripe_test_publishable_key" value="" required />
121
+ <p class="description">Enter your Stripe test publishable key.</p>
122
+ </td>
123
+ </tr>
124
+ <tr valign="top">
125
+ <th scope="row"><?php echo SwpmUtils::_( 'Test Secret Key' ); ?></th>
126
+ <td>
127
+ <input type="text" size="50" name="stripe_test_secret_key" value="" required />
128
+ <p class="description">Enter your Stripe test secret key.</p>
129
+ </td>
130
+ </tr>
131
+ <tr valign="top">
132
+ <th scope="row"><?php echo SwpmUtils::_( 'Live Publishable Key' ); ?></th>
133
+ <td>
134
+ <input type="text" size="50" name="stripe_live_publishable_key" value="" required />
135
+ <p class="description">Enter your Stripe live publishable key.</p>
136
+ </td>
137
+ </tr>
138
+ <tr valign="top">
139
+ <th scope="row"><?php echo SwpmUtils::_( 'Live Secret Key' ); ?></th>
140
+ <td>
141
+ <input type="text" size="50" name="stripe_live_secret_key" value="" required />
142
+ <p class="description">Enter your Stripe live secret key.</p>
143
+ </td>
144
+ </tr>
145
+
146
+ <tr valign="top">
147
+ <th colspan="2">
148
+ <div class="swpm-grey-box"><?php echo SwpmUtils::_( 'The following details are optional.' ); ?></div>
149
+ </th>
150
+ </tr>
151
+
152
+ <tr valign="top">
153
+ <th scope="row"><?php echo SwpmUtils::_( 'Collect Customer Address' ); ?></th>
154
+ <td>
155
+ <input type="checkbox" name="collect_address" value="1" />
156
+ <p class="description">Enable this option if you want to collect customer address during Stripe checkout.</p>
157
+ </td>
158
+ </tr>
159
+
160
+ <tr valign="top">
161
+ <th scope="row"><?php echo SwpmUtils::_( 'Return URL' ); ?></th>
162
+ <td>
163
+ <input type="text" size="100" name="return_url" value="" />
164
+ <p class="description">This is the URL the user will be redirected to after a successful payment. Enter the URL of your Thank You page here.</p>
165
+ </td>
166
+ </tr>
167
+
168
+ </table>
169
+
170
+ <script>
171
+ var swpmInputsArr = ['stripe_test_publishable_key', 'stripe_test_secret_key', 'stripe_live_publishable_key', 'stripe_live_secret_key'];
172
+ jQuery('input[name="stripe_use_global_keys"').change(function() {
173
+ var checked = jQuery(this).prop('checked');
174
+ jQuery.each(swpmInputsArr, function(index, el) {
175
+ jQuery('input[name="' + el + '"]').prop('disabled', checked);
176
+ });
177
+ });
178
+ jQuery('input[name="stripe_use_global_keys"').trigger('change');
179
+ </script>
180
+
181
+ <p class="submit">
182
+ <?php wp_nonce_field( 'swpm_admin_add_edit_stripe_sca_buy_now_btn', 'swpm_admin_create_stripe_sca_buy_now_btn' ); ?>
183
+ <input type="submit" name="swpm_stripe_sca_buy_now_save_submit" class="button-primary" value="<?php echo SwpmUtils::_( 'Save Payment Data' ); ?>">
184
+ </p>
185
+
186
+ </form>
187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  </div>
189
+ </div>
190
  <?php
191
  }
192
 
223
 
224
  add_post_meta( $button_id, 'stripe_collect_address', isset( $_POST['collect_address'] ) ? '1' : '' );
225
 
226
+ $stripe_use_global_keys = filter_input( INPUT_POST, 'stripe_use_global_keys', FILTER_SANITIZE_NUMBER_INT );
227
+ $stripe_use_global_keys = $stripe_use_global_keys ? true : false;
228
+ add_post_meta( $button_id, 'stripe_use_global_keys', $stripe_use_global_keys );
229
+
230
  add_post_meta( $button_id, 'return_url', trim( sanitize_text_field( $_REQUEST['return_url'] ) ) );
231
  //add_post_meta($button_id, 'button_image_url', trim(sanitize_text_field($_REQUEST['button_image_url'])));
232
  //Redirect to the edit interface of this button with $button_id
273
  $collect_address = '';
274
  }
275
 
276
+ $use_global_keys = get_post_meta( $button_id, 'stripe_use_global_keys', true );
277
+
278
+ $use_global_keys = empty( $use_global_keys ) ? false : true;
279
+
280
  $return_url = get_post_meta( $button_id, 'return_url', true );
281
  //$button_image_url = get_post_meta($button_id, 'button_image_url', true);
282
  ?>
283
+ <div class="postbox">
284
+ <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Stripe Buy Now Button Configuration' ); ?></label></h3>
285
+ <div class="inside">
286
+
287
+ <form id="stripe_button_config_form" method="post">
288
+ <input type="hidden" name="button_type" value="<?php echo $button_type; ?>">
289
+
290
+ <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
291
+
292
+ <tr valign="top">
293
+ <th scope="row"><?php echo SwpmUtils::_( 'Button ID' ); ?></th>
294
+ <td>
295
+ <input type="text" size="10" name="button_id" value="<?php echo $button_id; ?>" readonly required />
296
+ <p class="description">This is the ID of this payment button. It is automatically generated for you and it cannot be changed.</p>
297
+ </td>
298
+ </tr>
299
+ <tr valign="top">
300
+ <th scope="row"><?php echo SwpmUtils::_( 'Button Title' ); ?></th>
301
+ <td>
302
+ <input type="text" size="50" name="button_name" value="<?php echo $button->post_title; ?>" required />
303
+ <p class="description">Give this membership payment button a name. Example: Gold membership payment</p>
304
+ </td>
305
+ </tr>
306
+ <tr valign="top">
307
+ <th scope="row"><?php echo SwpmUtils::_( 'Membership Level' ); ?></th>
308
+ <td>
309
+ <select id="membership_level_id" name="membership_level_id">
310
+ <?php echo SwpmUtils::membership_level_dropdown( $membership_level_id ); ?>
311
+ </select>
312
+ <p class="description">Select the membership level this payment button is for.</p>
313
+ </td>
314
+ </tr>
315
+ <tr valign="top">
316
+ <th scope="row"><?php echo SwpmUtils::_( 'Payment Amount' ); ?></th>
317
+ <td>
318
+ <input type="text" size="6" name="payment_amount" value="<?php echo $payment_amount; ?>" required />
319
+ <p class="description">Enter payment amount. Example values: 10.00 or 19.50 or 299.95 etc (do not put currency symbol).</p>
320
+ </td>
321
+ </tr>
322
+ <tr valign="top">
323
+ <th scope="row"><?php echo SwpmUtils::_( 'Payment Currency' ); ?></th>
324
+ <td>
325
+ <select id="payment_currency" name="payment_currency">
326
+ <option value="USD" <?php echo ( $payment_currency == 'USD' ) ? 'selected="selected"' : ''; ?>>US Dollars ($)</option>
327
+ <option value="EUR" <?php echo ( $payment_currency == 'EUR' ) ? 'selected="selected"' : ''; ?>>Euros (€)</option>
328
+ <option value="GBP" <?php echo ( $payment_currency == 'GBP' ) ? 'selected="selected"' : ''; ?>>Pounds Sterling (£)</option>
329
+ <option value="AUD" <?php echo ( $payment_currency == 'AUD' ) ? 'selected="selected"' : ''; ?>>Australian Dollars ($)</option>
330
+ <option value="BRL" <?php echo ( $payment_currency == 'BRL' ) ? 'selected="selected"' : ''; ?>>Brazilian Real (R$)</option>
331
+ <option value="CAD" <?php echo ( $payment_currency == 'CAD' ) ? 'selected="selected"' : ''; ?>>Canadian Dollars ($)</option>
332
+ <option value="CNY" <?php echo ( $payment_currency == 'CNY' ) ? 'selected="selected"' : ''; ?>>Chinese Yuan</option>
333
+ <option value="CZK" <?php echo ( $payment_currency == 'CZK' ) ? 'selected="selected"' : ''; ?>>Czech Koruna</option>
334
+ <option value="DKK" <?php echo ( $payment_currency == 'DKK' ) ? 'selected="selected"' : ''; ?>>Danish Krone</option>
335
+ <option value="HKD" <?php echo ( $payment_currency == 'HKD' ) ? 'selected="selected"' : ''; ?>>Hong Kong Dollar ($)</option>
336
+ <option value="HUF" <?php echo ( $payment_currency == 'HUF' ) ? 'selected="selected"' : ''; ?>>Hungarian Forint</option>
337
+ <option value="INR" <?php echo ( $payment_currency == 'INR' ) ? 'selected="selected"' : ''; ?>>Indian Rupee</option>
338
+ <option value="IDR" <?php echo ( $payment_currency == 'IDR' ) ? 'selected="selected"' : ''; ?>>Indonesia Rupiah</option>
339
+ <option value="ILS" <?php echo ( $payment_currency == 'ILS' ) ? 'selected="selected"' : ''; ?>>Israeli Shekel</option>
340
+ <option value="JPY" <?php echo ( $payment_currency == 'JPY' ) ? 'selected="selected"' : ''; ?>>Japanese Yen (¥)</option>
341
+ <option value="MYR" <?php echo ( $payment_currency == 'MYR' ) ? 'selected="selected"' : ''; ?>>Malaysian Ringgits</option>
342
+ <option value="MXN" <?php echo ( $payment_currency == 'MXN' ) ? 'selected="selected"' : ''; ?>>Mexican Peso ($)</option>
343
+ <option value="NZD" <?php echo ( $payment_currency == 'NZD' ) ? 'selected="selected"' : ''; ?>>New Zealand Dollar ($)</option>
344
+ <option value="NOK" <?php echo ( $payment_currency == 'NOK' ) ? 'selected="selected"' : ''; ?>>Norwegian Krone</option>
345
+ <option value="PHP" <?php echo ( $payment_currency == 'PHP' ) ? 'selected="selected"' : ''; ?>>Philippine Pesos</option>
346
+ <option value="PLN" <?php echo ( $payment_currency == 'PLN' ) ? 'selected="selected"' : ''; ?>>Polish Zloty</option>
347
+ <option value="SGD" <?php echo ( $payment_currency == 'SGD' ) ? 'selected="selected"' : ''; ?>>Singapore Dollar ($)</option>
348
+ <option value="ZAR" <?php echo ( $payment_currency == 'ZAR' ) ? 'selected="selected"' : ''; ?>>South African Rand (R)</option>
349
+ <option value="KRW" <?php echo ( $payment_currency == 'KRW' ) ? 'selected="selected"' : ''; ?>>South Korean Won</option>
350
+ <option value="SEK" <?php echo ( $payment_currency == 'SEK' ) ? 'selected="selected"' : ''; ?>>Swedish Krona</option>
351
+ <option value="CHF" <?php echo ( $payment_currency == 'CHF' ) ? 'selected="selected"' : ''; ?>>Swiss Franc</option>
352
+ <option value="TWD" <?php echo ( $payment_currency == 'TWD' ) ? 'selected="selected"' : ''; ?>>Taiwan New Dollars</option>
353
+ <option value="THB" <?php echo ( $payment_currency == 'THB' ) ? 'selected="selected"' : ''; ?>>Thai Baht</option>
354
+ <option value="TRY" <?php echo ( $payment_currency == 'TRY' ) ? 'selected="selected"' : ''; ?>>Turkish Lira</option>
355
+ <option value="VND" <?php echo ( $payment_currency == 'VND' ) ? 'selected="selected"' : ''; ?>>Vietnamese Dong</option>
356
+ </select>
357
+ <p class="description">Select the currency for this payment button.</p>
358
+ </td>
359
+ </tr>
360
+
361
+ <tr valign="top">
362
+ <th colspan="2">
363
+ <div class="swpm-grey-box"><?php echo SwpmUtils::_( 'Stripe API keys. You can get this from your Stripe account.' ); ?></div>
364
+ </th>
365
+ </tr>
366
+
367
+ <tr valign="top">
368
+ <th scope="row"><?php echo SwpmUtils::_( 'Use Global API Keys Settings' ); ?></th>
369
+ <td>
370
+ <input type="checkbox" name="stripe_use_global_keys" value="1" <?php echo $use_global_keys ? ' checked' : ''; ?> />
371
+ <p class="description"><?php echo SwpmUtils::_( 'Use API keys from <a href="admin.php?page=simple_wp_membership_settings&tab=2" target="_blank">Payment Settings</a> tab.' ); ?></p>
372
+ </td>
373
+ </tr>
374
+
375
+ <tr valign="top">
376
+ <th scope="row"><?php echo SwpmUtils::_( 'Test Publishable Key' ); ?></th>
377
+ <td>
378
+ <input type="text" size="50" name="stripe_test_publishable_key" value="<?php echo $stripe_test_publishable_key; ?>" required />
379
+ <p class="description">Enter your Stripe test publishable key.</p>
380
+ </td>
381
+ </tr>
382
+ <tr valign="top">
383
+ <th scope="row"><?php echo SwpmUtils::_( 'Test Secret Key' ); ?></th>
384
+ <td>
385
+ <input type="text" size="50" name="stripe_test_secret_key" value="<?php echo $stripe_test_secret_key; ?>" required />
386
+ <p class="description">Enter your Stripe test secret key.</p>
387
+ </td>
388
+ </tr>
389
+ <tr valign="top">
390
+ <th scope="row"><?php echo SwpmUtils::_( 'Live Publishable Key' ); ?></th>
391
+ <td>
392
+ <input type="text" size="50" name="stripe_live_publishable_key" value="<?php echo $stripe_live_publishable_key; ?>" required />
393
+ <p class="description">Enter your Stripe live publishable key.</p>
394
+ </td>
395
+ </tr>
396
+ <tr valign="top">
397
+ <th scope="row"><?php echo SwpmUtils::_( 'Live Secret Key' ); ?></th>
398
+ <td>
399
+ <input type="text" size="50" name="stripe_live_secret_key" value="<?php echo $stripe_live_secret_key; ?>" required />
400
+ <p class="description">Enter your Stripe live secret key.</p>
401
+ </td>
402
+ </tr>
403
+
404
+ <tr valign="top">
405
+ <th colspan="2">
406
+ <div class="swpm-grey-box"><?php echo SwpmUtils::_( 'The following details are optional.' ); ?></div>
407
+ </th>
408
+ </tr>
409
+
410
+ <tr valign="top">
411
+ <th scope="row"><?php echo SwpmUtils::_( 'Collect Customer Address' ); ?></th>
412
+ <td>
413
+ <input type="checkbox" name="collect_address" value="1" <?php echo $collect_address; ?> />
414
+ <p class="description">Enable this option if you want to collect customer address during Stripe checkout.</p>
415
+ </td>
416
+ </tr>
417
+
418
+ <tr valign="top">
419
+ <th scope="row"><?php echo SwpmUtils::_( 'Return URL' ); ?></th>
420
+ <td>
421
+ <input type="text" size="100" name="return_url" value="<?php echo $return_url; ?>" />
422
+ <p class="description">This is the URL the user will be redirected to after a successful payment. Enter the URL of your Thank You page here.</p>
423
+ </td>
424
+ </tr>
425
+
426
+ </table>
427
+
428
+ <script>
429
+ var swpmInputsArr = ['stripe_test_publishable_key', 'stripe_test_secret_key', 'stripe_live_publishable_key', 'stripe_live_secret_key'];
430
+ jQuery('input[name="stripe_use_global_keys"').change(function() {
431
+ var checked = jQuery(this).prop('checked');
432
+ jQuery.each(swpmInputsArr, function(index, el) {
433
+ jQuery('input[name="' + el + '"]').prop('disabled', checked);
434
+ });
435
+ });
436
+ jQuery('input[name="stripe_use_global_keys"').trigger('change');
437
+ </script>
438
+
439
+ <p class="submit">
440
  <?php wp_nonce_field( 'swpm_admin_add_edit_stripe_sca_buy_now_btn', 'swpm_admin_edit_stripe_sca_buy_now_btn' ); ?>
441
+ <input type="submit" name="swpm_stripe_sca_buy_now_edit_submit" class="button-primary" value="<?php echo SwpmUtils::_( 'Save Payment Data' ); ?>">
442
+ </p>
443
 
444
+ </form>
445
 
 
446
  </div>
447
+ </div>
448
  <?php
449
  }
450
 
475
  update_post_meta( $button_id, 'payment_amount', trim( sanitize_text_field( $_REQUEST['payment_amount'] ) ) );
476
  update_post_meta( $button_id, 'payment_currency', sanitize_text_field( $_REQUEST['payment_currency'] ) );
477
 
478
+ $stripe_test_secret_key = filter_input( INPUT_POST, 'stripe_test_secret_key', FILTER_SANITIZE_STRING );
479
+ $stripe_test_publishable_key = filter_input( INPUT_POST, 'stripe_test_publishable_key', FILTER_SANITIZE_STRING );
480
+
481
+ if ( ! is_null( $stripe_test_secret_key ) ) {
482
+ update_post_meta( $button_id, 'stripe_test_secret_key', trim( $stripe_test_secret_key ) );
483
+ }
484
+
485
+ if ( ! is_null( $stripe_test_publishable_key ) ) {
486
+ update_post_meta( $button_id, 'stripe_test_publishable_key', trim( $stripe_test_publishable_key ) );
487
+ }
488
+
489
+ $stripe_live_secret_key = filter_input( INPUT_POST, 'stripe_live_secret_key', FILTER_SANITIZE_STRING );
490
+ $stripe_live_publishable_key = filter_input( INPUT_POST, 'stripe_live_publishable_key', FILTER_SANITIZE_STRING );
491
+
492
+ if ( ! is_null( $stripe_live_secret_key ) ) {
493
+ update_post_meta( $button_id, 'stripe_live_secret_key', trim( $stripe_live_secret_key ) );
494
+ }
495
+
496
+ if ( ! is_null( $stripe_live_publishable_key ) ) {
497
+ update_post_meta( $button_id, 'stripe_live_publishable_key', trim( $stripe_live_publishable_key ) );
498
+ }
499
 
500
  update_post_meta( $button_id, 'stripe_collect_address', isset( $_POST['collect_address'] ) ? '1' : '' );
501
 
502
+ $stripe_use_global_keys = filter_input( INPUT_POST, 'stripe_use_global_keys', FILTER_SANITIZE_NUMBER_INT );
503
+ $stripe_use_global_keys = $stripe_use_global_keys ? true : false;
504
+
505
+ update_post_meta( $button_id, 'stripe_use_global_keys', $stripe_use_global_keys );
506
+
507
  update_post_meta( $button_id, 'return_url', trim( sanitize_text_field( $_REQUEST['return_url'] ) ) );
508
  //update_post_meta($button_id, 'button_image_url', trim(sanitize_text_field($_REQUEST['button_image_url'])));
509
 
views/payments/payment-gateway/admin_stripe_sca_subscription_button.php CHANGED
@@ -18,6 +18,18 @@ function swpm_render_new_edit_stripe_sca_subscription_button_interface( $opts, $
18
  return;
19
  }
20
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  function swpm_stripe_sca_subscr_gen_curr_opts( $selected = false ) {
22
  $curr_arr = array(
23
  'USD' => 'US Dollars ($)',
@@ -64,163 +76,182 @@ function swpm_render_new_edit_stripe_sca_subscription_button_interface( $opts, $
64
  }
65
  ?>
66
 
67
- <div class="swpm-orange-box">
68
- View the <a target="_blank" href="https://simple-membership-plugin.com/create-stripe-subscription-button-membership-payment/">documentation</a>&nbsp;
69
- to learn how to create a Stripe Subscription payment button and use it.
70
- </div>
71
-
72
- <form id="stripe_sca_subsciption_button_config_form" method="post">
73
-
74
- <div class="postbox">
75
- <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Stripe Subscription Button Configuration' ); ?></label></h3>
76
- <div class="inside">
77
- <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
78
- <?php if ( ! $edit ) { ?>
79
- <input type="hidden" name="button_type" value="<?php echo sanitize_text_field( $_REQUEST['button_type'] ); ?>">
80
- <input type="hidden" name="swpm_button_type_selected" value="1">
81
- <?php } else { ?>
82
- <tr valign="top">
83
- <th scope="row"><?php echo SwpmUtils::_( 'Button ID' ); ?></th>
84
- <td>
85
- <input type="text" size="10" name="button_id" value="<?php echo $opts['button_id']; ?>" readonly required />
86
- <p class="description">This is the ID of this payment button. It is automatically generated for you and it cannot be changed.</p>
87
- </td>
88
- </tr>
89
- <?php } ?>
90
- <tr valign="top">
91
- <th scope="row"><?php echo SwpmUtils::_( 'Button Title' ); ?></th>
92
- <td>
93
- <input type="text" size="50" name="button_name" value="<?php echo ( $edit ? $opts['button_title'] : '' ); ?>" required />
94
- <p class="description">Give this membership payment button a name. Example: Gold membership payment</p>
95
- </td>
96
- </tr>
97
-
98
- <tr valign="top">
99
- <th scope="row"><?php echo SwpmUtils::_( 'Membership Level' ); ?></th>
100
- <td>
101
- <select id="membership_level_id" name="membership_level_id">
102
- <?php echo ( $edit ? SwpmUtils::membership_level_dropdown( $opts['membership_level_id'][0] ) : SwpmUtils::membership_level_dropdown() ); ?>
103
- </select>
104
- <p class="description">Select the membership level this payment button is for.</p>
105
- </td>
106
- </tr>
107
-
108
- <tr valign="top">
109
- <th scope="row"><?php echo SwpmUtils::_( 'Stripe Plan ID' ); ?></th>
110
- <td>
111
- <input type="text" name="stripe_plan_id" value="<?php echo ( $edit ? $opts['stripe_plan_id'][0] : '' ); ?>" required />
112
- <p class="description">
113
- ID of the plan that you want subscribers to be assigned to. You can get more details in the
114
- <a href="https://simple-membership-plugin.com/create-stripe-subscription-button-membership-payment/" target="_blank">documentation</a>.
115
- </p>
116
- </td>
117
- </tr>
118
-
119
- <tr valign="top">
120
- <th scope="row"><?php echo SwpmUtils::_( 'Trial Period' ); ?></th>
121
- <td>
122
- <input type="number" min="0" name="stripe_trial_period" value="<?php echo $edit ? esc_attr( $opts['stripe_trial_period'][0] ) : ''; ?>" /> days
123
- <p class="description">If you want to use a trial period then enter the number of days in this field. Subscriptions to this plan will automatically start after that. If left blank or 0, trial period is disabled.</p>
124
- </td>
125
- </tr>
126
-
127
- </table>
128
-
129
- </div>
130
- </div><!-- end of main button configuration box -->
131
-
132
- <div class="postbox">
133
- <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Stripe API Settings' ); ?></label></h3>
134
- <div class="inside">
135
-
136
- <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
137
-
138
- <tr valign="top">
139
- <th scope="row"><?php echo SwpmUtils::_( 'Test Publishable Key' ); ?></th>
140
- <td>
141
- <input type="text" size="100" name="stripe_test_publishable_key" value="<?php echo ( $edit ? $opts['stripe_test_publishable_key'][0] : '' ); ?>" />
142
- <p class="description">Enter your Stripe test publishable key.</p>
143
- </td>
144
- </tr>
145
-
146
- <tr valign="top">
147
- <th scope="row"><?php echo SwpmUtils::_( 'Test Secret Key' ); ?></th>
148
- <td>
149
- <input type="text" size="100" name="stripe_test_secret_key" value="<?php echo ( $edit ? $opts['stripe_test_secret_key'][0] : '' ); ?>" />
150
- <p class="description">Enter your Stripe test secret key.</p>
151
- </td>
152
- </tr>
153
-
154
- <tr valign="top">
155
- <th scope="row"><?php echo SwpmUtils::_( 'Live Publishable Key' ); ?></th>
156
- <td>
157
- <input type="text" size="100" name="stripe_live_publishable_key" value="<?php echo ( $edit ? $opts['stripe_live_publishable_key'][0] : '' ); ?>" />
158
- <p class="description">Enter your Stripe live publishable key.</p>
159
- </td>
160
- </tr>
161
-
162
- <tr valign="top">
163
- <th scope="row"><?php echo SwpmUtils::_( 'Live Secret Key' ); ?></th>
164
- <td>
165
- <input type="text" size="100" name="stripe_live_secret_key" value="<?php echo ( $edit ? $opts['stripe_live_secret_key'][0] : '' ); ?>" />
166
- <p class="description">Enter your Stripe live secret key.</p>
167
- </td>
168
- </tr>
169
-
170
- <tr valign="top">
171
- <th scope="row"><?php echo SwpmUtils::_( 'Webook Endpoint URL' ); ?></th>
172
- <td>
173
- <kbd><?php echo SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '/?swpm_process_stripe_subscription=1&hook=1'; ?></kbd>
174
- <p class="description">You should create a new Webhook in your Stripe account and put this URL there if you want the plugin to handle subscription expiration automatically.<br />
175
- You can get more info in the <a href="https://simple-membership-plugin.com/create-stripe-subscription-button-membership-payment/" target="_blank">documentation</a>.
176
- </p>
177
- </td>
178
- </tr>
179
-
180
- </table>
181
- </div>
182
- </div><!-- end of Stripe API Keys box -->
183
-
184
- <div class="postbox">
185
- <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Optional Details' ); ?></label></h3>
186
- <div class="inside">
187
-
188
- <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
189
-
190
- <tr valign="top">
191
- <th scope="row"><?php echo SwpmUtils::_( 'Collect Customer Address' ); ?></th>
192
- <td>
193
- <input type="checkbox" name="collect_address" value="1"<?php echo ( $edit ? ( ( isset( $opts['stripe_collect_address'][0] ) && $opts['stripe_collect_address'][0] === '1' ) ? ' checked' : '' ) : '' ); ?>/>
194
- <p class="description">Enable this option if you want to collect customer address during Stripe checkout.</p>
195
- </td>
196
- </tr>
197
-
198
- <tr valign="top">
199
- <th scope="row"><?php echo SwpmUtils::_( 'Return URL' ); ?></th>
200
- <td>
201
- <input type="text" size="100" name="return_url" value="<?php echo ( $edit ? $opts['return_url'][0] : '' ); ?>" />
202
- <p class="description">This is the URL the user will be redirected to after a successful payment. Enter the URL of your Thank You page here.</p>
203
- </td>
204
- </tr>
205
-
206
- <tr valign="top">
207
- <th scope="row"><?php echo SwpmUtils::_( 'Button Image URL' ); ?></th>
208
- <td>
209
- <input type="text" size="100" name="button_image_url" value="<?php echo ( $edit ? $opts['button_image_url'][0] : '' ); ?>" />
210
- <p class="description">If you want to customize the look of the button using an image then enter the URL of the image.</p>
211
- </td>
212
- </tr>
213
-
214
- </table>
215
- </div>
216
- </div><!-- end of optional details box -->
217
-
218
- <p class="submit">
219
- <?php wp_nonce_field( 'swpm_admin_add_edit_stripe_sca_subs_btn', 'swpm_admin_add_edit_stripe_sca_subs_btn' ); ?>
220
- <input type="submit" name="swpm_stripe_sca_subscription_<?php echo ( $edit ? 'edit' : 'save' ); ?>_submit" class="button-primary" value="<?php echo SwpmUtils::_( 'Save Payment Data' ); ?>" >
221
- </p>
222
-
223
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
224
 
225
  <?php
226
  }
@@ -255,6 +286,7 @@ add_action( 'swpm_create_new_button_process_submission', 'swpm_save_edit_stripe_
255
  add_action( 'swpm_edit_payment_button_process_submission', 'swpm_save_edit_stripe_sca_subscription_button_data' );
256
 
257
  function swpm_save_edit_stripe_sca_subscription_button_data() {
 
258
  if ( isset( $_REQUEST['swpm_stripe_sca_subscription_save_submit'] ) ) {
259
  $edit = false;
260
  }
@@ -294,15 +326,38 @@ function swpm_save_edit_stripe_sca_subscription_button_data() {
294
  update_post_meta( $button_id, 'button_image_url', trim( sanitize_text_field( $_REQUEST['button_image_url'] ) ) );
295
  update_post_meta( $button_id, 'stripe_collect_address', isset( $_POST['collect_address'] ) ? '1' : '' );
296
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  if ( $edit ) {
298
  // let's see if Stripe details (plan ID and Secret Key) are valid
299
  $stripe_error_msg = '';
300
  $settings = SwpmSettings::get_instance();
301
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
302
  if ( $sandbox_enabled ) {
303
- $secret_key = sanitize_text_field( $_REQUEST['stripe_test_secret_key'] );
304
  } else {
305
- $secret_key = sanitize_text_field( $_REQUEST['stripe_live_secret_key'] );
306
  }
307
 
308
  require_once SIMPLE_WP_MEMBERSHIP_PATH . 'lib/stripe-util-functions.php';
@@ -313,11 +368,6 @@ function swpm_save_edit_stripe_sca_subscription_button_data() {
313
  $stripe_error_msg = $result['error_msg'];
314
  }
315
  }
316
- //API details
317
- update_post_meta( $button_id, 'stripe_test_secret_key', sanitize_text_field( $_REQUEST['stripe_test_secret_key'] ) );
318
- update_post_meta( $button_id, 'stripe_test_publishable_key', sanitize_text_field( $_REQUEST['stripe_test_publishable_key'] ) );
319
- update_post_meta( $button_id, 'stripe_live_secret_key', sanitize_text_field( $_REQUEST['stripe_live_secret_key'] ) );
320
- update_post_meta( $button_id, 'stripe_live_publishable_key', sanitize_text_field( $_REQUEST['stripe_live_publishable_key'] ) );
321
 
322
  //Subscription billing details
323
  update_post_meta( $button_id, 'stripe_plan_id', sanitize_text_field( $_REQUEST['stripe_plan_id'] ) );
@@ -331,9 +381,9 @@ function swpm_save_edit_stripe_sca_subscription_button_data() {
331
  echo '<div id="message" class="error"><p>' . $stripe_error_msg . '</p></div>';
332
  }
333
  } else {
334
- //Redirect to the edit interface of this button with $button_id
335
- $url = admin_url() . 'admin.php?page=simple_wp_membership_payments&tab=edit_button&button_id=' . $button_id . '&button_type=' . $button_type;
336
- SwpmMiscUtils::redirect_to_url( $url );
337
  }
338
  }
339
  }
18
  return;
19
  }
20
 
21
+ if ( isset( $opts['stripe_use_global_keys'][0] ) ) {
22
+ $use_global_keys = $opts['stripe_use_global_keys'][0];
23
+ } else {
24
+ $use_global_keys = $edit ? false : true;
25
+ }
26
+
27
+ $stripe_test_publishable_key = isset( $opts['stripe_test_publishable_key'][0] ) ? $opts['stripe_test_publishable_key'][0] : '';
28
+ $stripe_test_secret_key = isset( $opts['stripe_test_secret_key'][0] ) ? $opts['stripe_test_secret_key'][0] : '';
29
+
30
+ $stripe_live_publishable_key = isset( $opts['stripe_live_publishable_key'][0] ) ? $opts['stripe_live_publishable_key'][0] : '';
31
+ $stripe_live_secret_key = isset( $opts['stripe_live_secret_key'][0] ) ? $opts['stripe_live_secret_key'][0] : '';
32
+
33
  function swpm_stripe_sca_subscr_gen_curr_opts( $selected = false ) {
34
  $curr_arr = array(
35
  'USD' => 'US Dollars ($)',
76
  }
77
  ?>
78
 
79
+ <div class="swpm-orange-box">
80
+ View the <a target="_blank" href="https://simple-membership-plugin.com/sca-compliant-stripe-subscription-button/">documentation</a>&nbsp;
81
+ to learn how to create a Stripe Subscription payment button and use it.
82
+ </div>
83
+
84
+ <form id="stripe_sca_subsciption_button_config_form" method="post">
85
+
86
+ <div class="postbox">
87
+ <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Stripe Subscription Button Configuration' ); ?></label></h3>
88
+ <div class="inside">
89
+ <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
90
+ <?php if ( ! $edit ) { ?>
91
+ <input type="hidden" name="button_type" value="<?php echo sanitize_text_field( $_REQUEST['button_type'] ); ?>">
92
+ <input type="hidden" name="swpm_button_type_selected" value="1">
93
+ <?php } else { ?>
94
+ <tr valign="top">
95
+ <th scope="row"><?php echo SwpmUtils::_( 'Button ID' ); ?></th>
96
+ <td>
97
+ <input type="text" size="10" name="button_id" value="<?php echo $opts['button_id']; ?>" readonly required />
98
+ <p class="description">This is the ID of this payment button. It is automatically generated for you and it cannot be changed.</p>
99
+ </td>
100
+ </tr>
101
+ <?php } ?>
102
+ <tr valign="top">
103
+ <th scope="row"><?php echo SwpmUtils::_( 'Button Title' ); ?></th>
104
+ <td>
105
+ <input type="text" size="50" name="button_name" value="<?php echo ( $edit ? $opts['button_title'] : '' ); ?>" required />
106
+ <p class="description">Give this membership payment button a name. Example: Gold membership payment</p>
107
+ </td>
108
+ </tr>
109
+
110
+ <tr valign="top">
111
+ <th scope="row"><?php echo SwpmUtils::_( 'Membership Level' ); ?></th>
112
+ <td>
113
+ <select id="membership_level_id" name="membership_level_id">
114
+ <?php echo ( $edit ? SwpmUtils::membership_level_dropdown( $opts['membership_level_id'][0] ) : SwpmUtils::membership_level_dropdown() ); ?>
115
+ </select>
116
+ <p class="description">Select the membership level this payment button is for.</p>
117
+ </td>
118
+ </tr>
119
+
120
+ <tr valign="top">
121
+ <th scope="row"><?php echo SwpmUtils::_( 'Stripe Plan ID' ); ?></th>
122
+ <td>
123
+ <input type="text" name="stripe_plan_id" value="<?php echo ( $edit ? $opts['stripe_plan_id'][0] : '' ); ?>" required />
124
+ <p class="description">
125
+ ID of the plan that you want subscribers to be assigned to. You can get more details in the
126
+ <a href="https://simple-membership-plugin.com/create-stripe-subscription-button-membership-payment/" target="_blank">documentation</a>.
127
+ </p>
128
+ </td>
129
+ </tr>
130
+
131
+ <tr valign="top">
132
+ <th scope="row"><?php echo SwpmUtils::_( 'Trial Period' ); ?></th>
133
+ <td>
134
+ <input type="number" min="0" name="stripe_trial_period" value="<?php echo $edit ? esc_attr( $opts['stripe_trial_period'][0] ) : ''; ?>" /> days
135
+ <p class="description">If you want to use a trial period then enter the number of days in this field. Subscriptions to this plan will automatically start after that. If left blank or 0, trial period is disabled.</p>
136
+ </td>
137
+ </tr>
138
+
139
+ </table>
140
+
141
+ </div>
142
+ </div><!-- end of main button configuration box -->
143
+
144
+ <div class="postbox">
145
+ <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Stripe API Settings' ); ?></label></h3>
146
+ <div class="inside">
147
+
148
+ <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
149
+
150
+ <tr valign="top">
151
+ <th scope="row"><?php echo SwpmUtils::_( 'Use Global API Keys Settings' ); ?></th>
152
+ <td>
153
+ <input type="checkbox" name="stripe_use_global_keys" value="1" <?php echo $edit ? ( $use_global_keys ? ' checked' : '' ) : ' checked'; ?> />
154
+ <p class="description"><?php echo SwpmUtils::_( 'Use API keys from <a href="admin.php?page=simple_wp_membership_settings&tab=2" target="_blank">Payment Settings</a> tab.' ); ?></p>
155
+ </td>
156
+ </tr>
157
+
158
+ <tr valign="top">
159
+ <th scope="row"><?php echo SwpmUtils::_( 'Test Publishable Key' ); ?></th>
160
+ <td>
161
+ <input type="text" size="100" name="stripe_test_publishable_key" value="<?php echo esc_attr( $edit ? $stripe_test_publishable_key : '' ); ?>" />
162
+ <p class="description">Enter your Stripe test publishable key.</p>
163
+ </td>
164
+ </tr>
165
+
166
+ <tr valign="top">
167
+ <th scope="row"><?php echo SwpmUtils::_( 'Test Secret Key' ); ?></th>
168
+ <td>
169
+ <input type="text" size="100" name="stripe_test_secret_key" value="<?php echo esc_attr( $edit ? $stripe_test_secret_key : '' ); ?>" />
170
+ <p class="description">Enter your Stripe test secret key.</p>
171
+ </td>
172
+ </tr>
173
+
174
+ <tr valign="top">
175
+ <th scope="row"><?php echo SwpmUtils::_( 'Live Publishable Key' ); ?></th>
176
+ <td>
177
+ <input type="text" size="100" name="stripe_live_publishable_key" value="<?php echo esc_attr( $edit ? $stripe_live_publishable_key : '' ); ?>" />
178
+ <p class="description">Enter your Stripe live publishable key.</p>
179
+ </td>
180
+ </tr>
181
+
182
+ <tr valign="top">
183
+ <th scope="row"><?php echo SwpmUtils::_( 'Live Secret Key' ); ?></th>
184
+ <td>
185
+ <input type="text" size="100" name="stripe_live_secret_key" value="<?php echo esc_attr( $edit ? $stripe_live_secret_key : '' ); ?>" />
186
+ <p class="description">Enter your Stripe live secret key.</p>
187
+ </td>
188
+ </tr>
189
+
190
+ <tr valign="top">
191
+ <th scope="row"><?php echo SwpmUtils::_( 'Webhook Endpoint URL' ); ?></th>
192
+ <td>
193
+ <kbd><?php echo SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '/?swpm_process_stripe_subscription=1&hook=1'; ?></kbd>
194
+ <p class="description">You should create a new Webhook in your Stripe account and put this URL there if you want the plugin to handle subscription expiration automatically.<br />
195
+ You can get more info in the <a href="https://simple-membership-plugin.com/create-stripe-subscription-button-membership-payment/" target="_blank">documentation</a>.
196
+ </p>
197
+ </td>
198
+ </tr>
199
+
200
+ <script>
201
+ var swpmInputsArr = ['stripe_test_publishable_key', 'stripe_test_secret_key', 'stripe_live_publishable_key', 'stripe_live_secret_key'];
202
+ jQuery('input[name="stripe_use_global_keys"').change(function() {
203
+ var checked = jQuery(this).prop('checked');
204
+ jQuery.each(swpmInputsArr, function(index, el) {
205
+ jQuery('input[name="' + el + '"]').prop('disabled', checked);
206
+ });
207
+ });
208
+ jQuery('input[name="stripe_use_global_keys"').trigger('change');
209
+ </script>
210
+
211
+ </table>
212
+ </div>
213
+ </div><!-- end of Stripe API Keys box -->
214
+
215
+ <div class="postbox">
216
+ <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Optional Details' ); ?></label></h3>
217
+ <div class="inside">
218
+
219
+ <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
220
+
221
+ <tr valign="top">
222
+ <th scope="row"><?php echo SwpmUtils::_( 'Collect Customer Address' ); ?></th>
223
+ <td>
224
+ <input type="checkbox" name="collect_address" value="1" <?php echo ( $edit ? ( ( isset( $opts['stripe_collect_address'][0] ) && $opts['stripe_collect_address'][0] === '1' ) ? ' checked' : '' ) : '' ); ?> />
225
+ <p class="description">Enable this option if you want to collect customer address during Stripe checkout.</p>
226
+ </td>
227
+ </tr>
228
+
229
+ <tr valign="top">
230
+ <th scope="row"><?php echo SwpmUtils::_( 'Return URL' ); ?></th>
231
+ <td>
232
+ <input type="text" size="100" name="return_url" value="<?php echo ( $edit ? $opts['return_url'][0] : '' ); ?>" />
233
+ <p class="description">This is the URL the user will be redirected to after a successful payment. Enter the URL of your Thank You page here.</p>
234
+ </td>
235
+ </tr>
236
+
237
+ <tr valign="top">
238
+ <th scope="row"><?php echo SwpmUtils::_( 'Button Image URL' ); ?></th>
239
+ <td>
240
+ <input type="text" size="100" name="button_image_url" value="<?php echo ( $edit ? $opts['button_image_url'][0] : '' ); ?>" />
241
+ <p class="description">If you want to customize the look of the button using an image then enter the URL of the image.</p>
242
+ </td>
243
+ </tr>
244
+
245
+ </table>
246
+ </div>
247
+ </div><!-- end of optional details box -->
248
+
249
+ <p class="submit">
250
+ <?php wp_nonce_field( 'swpm_admin_add_edit_stripe_sca_subs_btn', 'swpm_admin_add_edit_stripe_sca_subs_btn' ); ?>
251
+ <input type="submit" name="swpm_stripe_sca_subscription_<?php echo ( $edit ? 'edit' : 'save' ); ?>_submit" class="button-primary" value="<?php echo SwpmUtils::_( 'Save Payment Data' ); ?>">
252
+ </p>
253
+
254
+ </form>
255
 
256
  <?php
257
  }
286
  add_action( 'swpm_edit_payment_button_process_submission', 'swpm_save_edit_stripe_sca_subscription_button_data' );
287
 
288
  function swpm_save_edit_stripe_sca_subscription_button_data() {
289
+
290
  if ( isset( $_REQUEST['swpm_stripe_sca_subscription_save_submit'] ) ) {
291
  $edit = false;
292
  }
326
  update_post_meta( $button_id, 'button_image_url', trim( sanitize_text_field( $_REQUEST['button_image_url'] ) ) );
327
  update_post_meta( $button_id, 'stripe_collect_address', isset( $_POST['collect_address'] ) ? '1' : '' );
328
 
329
+ //API details
330
+ $stripe_test_secret_key = filter_input( INPUT_POST, 'stripe_test_secret_key', FILTER_SANITIZE_STRING );
331
+ $stripe_test_publishable_key = filter_input( INPUT_POST, 'stripe_test_publishable_key', FILTER_SANITIZE_STRING );
332
+ $stripe_live_secret_key = filter_input( INPUT_POST, 'stripe_live_secret_key', FILTER_SANITIZE_STRING );
333
+ $stripe_live_publishable_key = filter_input( INPUT_POST, 'stripe_live_publishable_key', FILTER_SANITIZE_STRING );
334
+ if ( isset( $stripe_test_secret_key ) ) {
335
+ update_post_meta( $button_id, 'stripe_test_secret_key', sanitize_text_field( $stripe_test_secret_key ) );
336
+ }
337
+ if ( isset( $stripe_test_publishable_key ) ) {
338
+ update_post_meta( $button_id, 'stripe_test_publishable_key', sanitize_text_field( $stripe_test_publishable_key ) );
339
+ }
340
+ if ( isset( $stripe_live_secret_key ) ) {
341
+ update_post_meta( $button_id, 'stripe_live_secret_key', sanitize_text_field( $stripe_live_secret_key ) );
342
+ }
343
+ if ( isset( $stripe_live_publishable_key ) ) {
344
+ update_post_meta( $button_id, 'stripe_live_publishable_key', sanitize_text_field( $stripe_live_publishable_key ) );
345
+ }
346
+
347
+ $stripe_use_global_keys = filter_input( INPUT_POST, 'stripe_use_global_keys', FILTER_SANITIZE_NUMBER_INT );
348
+ $stripe_use_global_keys = $stripe_use_global_keys ? true : false;
349
+
350
+ update_post_meta( $button_id, 'stripe_use_global_keys', $stripe_use_global_keys );
351
+
352
  if ( $edit ) {
353
  // let's see if Stripe details (plan ID and Secret Key) are valid
354
  $stripe_error_msg = '';
355
  $settings = SwpmSettings::get_instance();
356
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
357
  if ( $sandbox_enabled ) {
358
+ $secret_key = $stripe_test_secret_key ? $stripe_test_secret_key : $settings->get_value( 'stripe-test-secret-key' );
359
  } else {
360
+ $secret_key = $stripe_live_secret_key ? $stripe_live_secret_key : $settings->get_value( 'stripe-live-secret-key' );
361
  }
362
 
363
  require_once SIMPLE_WP_MEMBERSHIP_PATH . 'lib/stripe-util-functions.php';
368
  $stripe_error_msg = $result['error_msg'];
369
  }
370
  }
 
 
 
 
 
371
 
372
  //Subscription billing details
373
  update_post_meta( $button_id, 'stripe_plan_id', sanitize_text_field( $_REQUEST['stripe_plan_id'] ) );
381
  echo '<div id="message" class="error"><p>' . $stripe_error_msg . '</p></div>';
382
  }
383
  } else {
384
+ //Redirect to the manage payment buttons interface
385
+ $url = admin_url() . 'admin.php?page=simple_wp_membership_payments&tab=payment_buttons';
386
+ SwpmMiscUtils::redirect_to_url( $url );
387
  }
388
  }
389
  }
views/payments/payment-gateway/admin_stripe_subscription_button.php CHANGED
@@ -3,328 +3,377 @@
3
  * Render the new Stripe Subscription payment button creation interface
4
  * ************************************************************** */
5
 
6
- function swpm_render_new_edit_stripe_subscription_button_interface($opts, $edit = false) {
7
-
8
- //Test for PHP v5.4.0 or show error and don't show the remaining interface.
9
- if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
10
- //The server is using at least PHP version 5.4.0
11
- //Can use Braintree gateway library
12
- } else {
13
- //This server can't handle Braintree library
14
- echo '<div class="swpm-red-box">';
15
- echo '<p>The Stripe subscription gateway library requires at least PHP 5.4.0. Your server is using a very old version of PHP.</p>';
16
- echo '<p>Request your hosting provider to upgrade your PHP to a more recent version then you will be able to use the Stripe subscription buttons.<p>';
17
- echo '</div>';
18
- return;
19
- }
20
-
21
- function swpm_stripe_subscr_gen_curr_opts($selected = false) {
22
- $curr_arr = array(
23
- "USD" => "US Dollars ($)",
24
- "EUR" => "Euros (€)",
25
- "GBP" => "Pounds Sterling (£)",
26
- "AUD" => "Australian Dollars ($)",
27
- "BRL" => "Brazilian Real (R$)",
28
- "CAD" => "Canadian Dollars ($)",
29
- "CNY" => "Chinese Yuan",
30
- "CZK" => "Czech Koruna",
31
- "DKK" => "Danish Krone",
32
- "HKD" => "Hong Kong Dollar ($)",
33
- "HUF" => "Hungarian Forint",
34
- "INR" => "Indian Rupee",
35
- "IDR" => "Indonesia Rupiah",
36
- "ILS" => "Israeli Shekel",
37
- "JPY" => "Japanese Yen (¥)",
38
- "MYR" => "Malaysian Ringgits",
39
- "MXN" => "Mexican Peso ($)",
40
- "NZD" => "New Zealand Dollar ($)",
41
- "NOK" => "Norwegian Krone",
42
- "PHP" => "Philippine Pesos",
43
- "PLN" => "Polish Zloty",
44
- "SGD" => "Singapore Dollar ($)",
45
- "ZAR" => "South African Rand (R)",
46
- "KRW" => "South Korean Won",
47
- "SEK" => "Swedish Krona",
48
- "CHF" => "Swiss Franc",
49
- "TWD" => "Taiwan New Dollars",
50
- "THB" => "Thai Baht",
51
- "TRY" => "Turkish Lira",
52
- "VND" => "Vietnamese Dong",
53
- );
54
- $out = '';
55
- foreach ($curr_arr as $key => $value) {
56
- if ($selected !== false && $selected == $key) {
57
- $sel = ' selected';
58
- } else {
59
- $sel = '';
60
- }
61
- $out .= '<option value="' . $key . '"' . $sel . '>' . $value . '</option>';
62
- }
63
- return $out;
64
- }
65
- ?>
66
-
67
- <div class="swpm-orange-box">
68
- View the <a target="_blank" href="https://simple-membership-plugin.com/create-stripe-subscription-button-membership-payment/">documentation</a>&nbsp;
69
- to learn how to create a Stripe Subscription payment button and use it.
70
- </div>
71
-
72
- <form id="stripe_subsciption_button_config_form" method="post">
73
-
74
- <div class="postbox">
75
- <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_('Stripe Subscription Button Configuration'); ?></label></h3>
76
- <div class="inside">
77
- <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
78
- <?php if (!$edit) { ?>
79
- <input type="hidden" name="button_type" value="<?php echo sanitize_text_field($_REQUEST['button_type']); ?>">
80
- <input type="hidden" name="swpm_button_type_selected" value="1">
81
- <?php } else { ?>
82
- <tr valign="top">
83
- <th scope="row"><?php echo SwpmUtils::_('Button ID'); ?></th>
84
- <td>
85
- <input type="text" size="10" name="button_id" value="<?php echo $opts['button_id']; ?>" readonly required />
86
- <p class="description">This is the ID of this payment button. It is automatically generated for you and it cannot be changed.</p>
87
- </td>
88
- </tr>
89
- <?php } ?>
90
- <tr valign="top">
91
- <th scope="row"><?php echo SwpmUtils::_('Button Title'); ?></th>
92
- <td>
93
- <input type="text" size="50" name="button_name" value="<?php echo ($edit ? $opts['button_title'] : ''); ?>" required />
94
- <p class="description">Give this membership payment button a name. Example: Gold membership payment</p>
95
- </td>
96
- </tr>
97
-
98
- <tr valign="top">
99
- <th scope="row"><?php echo SwpmUtils::_('Membership Level'); ?></th>
100
- <td>
101
- <select id="membership_level_id" name="membership_level_id">
102
- <?php echo ($edit ? SwpmUtils::membership_level_dropdown($opts['membership_level_id'][0]) : SwpmUtils::membership_level_dropdown()); ?>
103
- </select>
104
- <p class="description">Select the membership level this payment button is for.</p>
105
- </td>
106
- </tr>
107
-
108
- <tr valign="top">
109
- <th scope="row"><?php echo SwpmUtils::_('Stripe Plan ID'); ?></th>
110
- <td>
111
- <input type="text" name="stripe_plan_id" value="<?php echo ($edit ? $opts['stripe_plan_id'][0] : ''); ?>" required />
112
- <p class="description">
113
- ID of the plan that you want subscribers to be assigned to. You can get more details in the
114
- <a href="https://simple-membership-plugin.com/create-stripe-subscription-button-membership-payment/" target="_blank">documentation</a>.
115
- </p>
116
- </td>
117
- </tr>
118
-
119
- </table>
120
-
121
- </div>
122
- </div><!-- end of main button configuration box -->
123
-
124
- <div class="postbox">
125
- <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_('Stripe API Settings'); ?></label></h3>
126
- <div class="inside">
127
-
128
- <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
129
-
130
- <tr valign="top">
131
- <th scope="row"><?php echo SwpmUtils::_('Test Publishable Key'); ?></th>
132
- <td>
133
- <input type="text" size="100" name="stripe_test_publishable_key" value="<?php echo ($edit ? $opts['stripe_test_publishable_key'][0] : ''); ?>" />
134
- <p class="description">Enter your Stripe test publishable key.</p>
135
- </td>
136
- </tr>
137
-
138
- <tr valign="top">
139
- <th scope="row"><?php echo SwpmUtils::_('Test Secret Key'); ?></th>
140
- <td>
141
- <input type="text" size="100" name="stripe_test_secret_key" value="<?php echo ($edit ? $opts['stripe_test_secret_key'][0] : ''); ?>" />
142
- <p class="description">Enter your Stripe test secret key.</p>
143
- </td>
144
- </tr>
145
-
146
- <tr valign="top">
147
- <th scope="row"><?php echo SwpmUtils::_('Live Publishable Key'); ?></th>
148
- <td>
149
- <input type="text" size="100" name="stripe_live_publishable_key" value="<?php echo ($edit ? $opts['stripe_live_publishable_key'][0] : ''); ?>" />
150
- <p class="description">Enter your Stripe live publishable key.</p>
151
- </td>
152
- </tr>
153
-
154
- <tr valign="top">
155
- <th scope="row"><?php echo SwpmUtils::_('Live Secret Key'); ?></th>
156
- <td>
157
- <input type="text" size="100" name="stripe_live_secret_key" value="<?php echo ($edit ? $opts['stripe_live_secret_key'][0] : ''); ?>" />
158
- <p class="description">Enter your Stripe live secret key.</p>
159
- </td>
160
- </tr>
161
-
162
- <tr valign="top">
163
- <th scope="row"><?php echo SwpmUtils::_('Webook Endpoint URL'); ?></th>
164
- <td>
165
- <kbd><?php echo SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '/?swpm_process_stripe_subscription=1&hook=1'; ?></kbd>
166
- <p class="description">You should create a new Webhook in your Stripe account and put this URL there if you want the plugin to handle subscription expiration automatically.<br />
167
- You can get more info in the <a href="https://simple-membership-plugin.com/create-stripe-subscription-button-membership-payment/" target="_blank">documentation</a>.
168
- </p>
169
- </td>
170
- </tr>
171
-
172
- </table>
173
- </div>
174
- </div><!-- end of Stripe API Keys box -->
175
-
176
- <div class="postbox">
177
- <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_('Optional Details'); ?></label></h3>
178
- <div class="inside">
179
-
180
- <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
181
-
182
- <tr valign="top">
183
- <th scope="row"><?php echo SwpmUtils::_('Collect Customer Address'); ?></th>
184
- <td>
185
- <input type="checkbox" name="collect_address" value="1"<?php echo ($edit ? ((isset($opts['stripe_collect_address'][0]) && $opts['stripe_collect_address'][0] === '1') ? ' checked' : '') : ''); ?>/>
186
- <p class="description">Enable this option if you want to collect customer address during Stripe checkout.</p>
187
- </td>
188
- </tr>
189
-
190
- <tr valign="top">
191
- <th scope="row"><?php echo SwpmUtils::_('Return URL'); ?></th>
192
- <td>
193
- <input type="text" size="100" name="return_url" value="<?php echo ($edit ? $opts['return_url'][0] : ''); ?>" />
194
- <p class="description">This is the URL the user will be redirected to after a successful payment. Enter the URL of your Thank You page here.</p>
195
- </td>
196
- </tr>
197
-
198
- <tr valign="top">
199
- <th scope="row"><?php echo SwpmUtils::_('Button Image URL'); ?></th>
200
- <td>
201
- <input type="text" size="100" name="button_image_url" value="<?php echo ($edit ? $opts['button_image_url'][0] : ''); ?>" />
202
- <p class="description">If you want to customize the look of the button using an image then enter the URL of the image.</p>
203
- </td>
204
- </tr>
205
-
206
- </table>
207
- </div>
208
- </div><!-- end of optional details box -->
209
-
210
- <p class="submit">
211
- <?php wp_nonce_field('swpm_admin_add_edit_stripe_subs_btn','swpm_admin_add_edit_stripe_subs_btn') ?>
212
- <input type="submit" name="swpm_stripe_subscription_<?php echo ($edit ? 'edit' : 'save') ?>_submit" class="button-primary" value="<?php echo SwpmUtils::_('Save Payment Data'); ?>" >
213
- </p>
214
-
215
- </form>
216
-
217
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
218
  }
219
 
220
- add_action('swpm_create_new_button_for_stripe_subscription', 'swpm_create_new_stripe_subscription_button');
221
 
222
  function swpm_create_new_stripe_subscription_button() {
223
- swpm_render_new_edit_stripe_subscription_button_interface('');
224
  }
225
 
226
- add_action('swpm_edit_payment_button_for_stripe_subscription', 'swpm_edit_stripe_subscription_button');
227
 
228
  function swpm_edit_stripe_subscription_button() {
229
- //Retrieve the payment button data and present it for editing.
230
 
231
- $button_id = sanitize_text_field($_REQUEST['button_id']);
232
- $button_id = absint($button_id);
233
 
234
- $button = get_post($button_id); //Retrieve the CPT for this button
235
 
236
- $post_meta = get_post_meta($button_id);
237
- $post_meta['button_title'] = $button->post_title;
238
- $post_meta['button_id'] = $button_id;
239
 
240
- swpm_render_new_edit_stripe_subscription_button_interface($post_meta, true);
241
  }
242
 
243
  /*
244
  * Process submission and save the new PayPal Subscription payment button data
245
  */
246
- add_action('swpm_create_new_button_process_submission', 'swpm_save_edit_stripe_subscription_button_data');
247
- add_action('swpm_edit_payment_button_process_submission', 'swpm_save_edit_stripe_subscription_button_data');
248
 
249
  function swpm_save_edit_stripe_subscription_button_data() {
250
- if (isset($_REQUEST['swpm_stripe_subscription_save_submit'])) {
251
- $edit = false;
252
- }
253
- if (isset($_REQUEST['swpm_stripe_subscription_edit_submit'])) {
254
- $edit = true;
255
- }
256
- if (isset($edit)) {
257
- //This is a Stripe subscription button save or edit event. Process the submission.
258
- check_admin_referer( 'swpm_admin_add_edit_stripe_subs_btn', 'swpm_admin_add_edit_stripe_subs_btn' );
259
- if ($edit) {
260
- $button_id = sanitize_text_field($_REQUEST['button_id']);
261
- $button_id = absint($button_id);
262
- $button_type = sanitize_text_field($_REQUEST['button_type']);
263
- $button_name = sanitize_text_field($_REQUEST['button_name']);
264
-
265
- $button_post = array(
266
- 'ID' => $button_id,
267
- 'post_title' => $button_name,
268
- 'post_type' => 'swpm_payment_button',
269
- );
270
- wp_update_post($button_post);
271
- } else {
272
- $button_id = wp_insert_post(
273
- array(
274
- 'post_title' => sanitize_text_field($_REQUEST['button_name']),
275
- 'post_type' => 'swpm_payment_button',
276
- 'post_content' => '',
277
- 'post_status' => 'publish'
278
- )
279
- );
280
- $button_type = sanitize_text_field($_REQUEST['button_type']);
281
- }
282
-
283
- update_post_meta($button_id, 'button_type', $button_type);
284
- update_post_meta($button_id, 'membership_level_id', sanitize_text_field($_REQUEST['membership_level_id']));
285
- update_post_meta($button_id, 'return_url', trim(sanitize_text_field($_REQUEST['return_url'])));
286
- update_post_meta($button_id, 'button_image_url', trim(sanitize_text_field($_REQUEST['button_image_url'])));
287
- update_post_meta($button_id, 'stripe_collect_address', isset($_POST['collect_address']) ? '1' : '');
288
-
289
- if ($edit) {
290
- // let's see if Stripe details (plan ID and Secret Key) are valid
291
- $stripe_error_msg = '';
292
- $settings = SwpmSettings::get_instance();
293
- $sandbox_enabled = $settings->get_value('enable-sandbox-testing');
294
- if ($sandbox_enabled) {
295
- $secret_key = sanitize_text_field($_REQUEST['stripe_test_secret_key']);
296
- } else {
297
- $secret_key = sanitize_text_field($_REQUEST['stripe_live_secret_key']);
298
- }
299
-
300
- require_once(SIMPLE_WP_MEMBERSHIP_PATH . 'lib/stripe-util-functions.php');
301
- $result = StripeUtilFunctions::get_stripe_plan_info($secret_key, sanitize_text_field($_REQUEST['stripe_plan_id']));
302
- if ($result['success']) {
303
- $plan_data = $result['plan_data'];
304
- } else {
305
- $stripe_error_msg = $result['error_msg'];
306
- }
307
- }
308
- //API details
309
- update_post_meta($button_id, 'stripe_test_secret_key', sanitize_text_field($_REQUEST['stripe_test_secret_key']));
310
- update_post_meta($button_id, 'stripe_test_publishable_key', sanitize_text_field($_REQUEST['stripe_test_publishable_key']));
311
- update_post_meta($button_id, 'stripe_live_secret_key', sanitize_text_field($_REQUEST['stripe_live_secret_key']));
312
- update_post_meta($button_id, 'stripe_live_publishable_key', sanitize_text_field($_REQUEST['stripe_live_publishable_key']));
313
-
314
- //Subscription billing details
315
- update_post_meta($button_id, 'stripe_plan_id', sanitize_text_field($_REQUEST['stripe_plan_id']));
316
- update_post_meta($button_id, 'stripe_plan_data', (isset($plan_data) ? $plan_data : false));
317
-
318
- if ($edit) {
319
- if (empty($stripe_error_msg)) {
320
- echo '<div id="message" class="updated fade"><p>Payment button data successfully updated!</p></div>';
321
- } else {
322
- echo '<div id="message" class="error"><p>' . $stripe_error_msg . '</p></div>';
323
- }
324
- } else {
325
- //Redirect to the edit interface of this button with $button_id
326
- $url = admin_url() . 'admin.php?page=simple_wp_membership_payments&tab=edit_button&button_id=' . $button_id . '&button_type=' . $button_type;
327
- SwpmMiscUtils::redirect_to_url($url);
328
- }
329
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
  }
3
  * Render the new Stripe Subscription payment button creation interface
4
  * ************************************************************** */
5
 
6
+ function swpm_render_new_edit_stripe_subscription_button_interface( $opts, $edit = false ) {
7
+
8
+ //Test for PHP v5.4.0 or show error and don't show the remaining interface.
9
+ if ( version_compare( PHP_VERSION, '5.4.0' ) >= 0 ) {
10
+ //The server is using at least PHP version 5.4.0
11
+ //Can use Braintree gateway library
12
+ } else {
13
+ //This server can't handle Braintree library
14
+ echo '<div class="swpm-red-box">';
15
+ echo '<p>The Stripe subscription gateway library requires at least PHP 5.4.0. Your server is using a very old version of PHP.</p>';
16
+ echo '<p>Request your hosting provider to upgrade your PHP to a more recent version then you will be able to use the Stripe subscription buttons.<p>';
17
+ echo '</div>';
18
+ return;
19
+ }
20
+
21
+ if ( isset( $opts['stripe_use_global_keys'][0] ) ) {
22
+ $use_global_keys = $opts['stripe_use_global_keys'][0];
23
+ } else {
24
+ $use_global_keys = $edit ? false : true;
25
+ }
26
+
27
+ $stripe_test_publishable_key = isset( $opts['stripe_test_publishable_key'][0] ) ? $opts['stripe_test_publishable_key'][0] : '';
28
+ $stripe_test_secret_key = isset( $opts['stripe_test_secret_key'][0] ) ? $opts['stripe_test_secret_key'][0] : '';
29
+
30
+ $stripe_live_publishable_key = isset( $opts['stripe_live_publishable_key'][0] ) ? $opts['stripe_live_publishable_key'][0] : '';
31
+ $stripe_live_secret_key = isset( $opts['stripe_live_secret_key'][0] ) ? $opts['stripe_live_secret_key'][0] : '';
32
+
33
+ function swpm_stripe_subscr_gen_curr_opts( $selected = false ) {
34
+ $curr_arr = array(
35
+ 'USD' => 'US Dollars ($)',
36
+ 'EUR' => 'Euros (€)',
37
+ 'GBP' => 'Pounds Sterling (£)',
38
+ 'AUD' => 'Australian Dollars ($)',
39
+ 'BRL' => 'Brazilian Real (R$)',
40
+ 'CAD' => 'Canadian Dollars ($)',
41
+ 'CNY' => 'Chinese Yuan',
42
+ 'CZK' => 'Czech Koruna',
43
+ 'DKK' => 'Danish Krone',
44
+ 'HKD' => 'Hong Kong Dollar ($)',
45
+ 'HUF' => 'Hungarian Forint',
46
+ 'INR' => 'Indian Rupee',
47
+ 'IDR' => 'Indonesia Rupiah',
48
+ 'ILS' => 'Israeli Shekel',
49
+ 'JPY' => 'Japanese Yen (¥)',
50
+ 'MYR' => 'Malaysian Ringgits',
51
+ 'MXN' => 'Mexican Peso ($)',
52
+ 'NZD' => 'New Zealand Dollar ($)',
53
+ 'NOK' => 'Norwegian Krone',
54
+ 'PHP' => 'Philippine Pesos',
55
+ 'PLN' => 'Polish Zloty',
56
+ 'SGD' => 'Singapore Dollar ($)',
57
+ 'ZAR' => 'South African Rand (R)',
58
+ 'KRW' => 'South Korean Won',
59
+ 'SEK' => 'Swedish Krona',
60
+ 'CHF' => 'Swiss Franc',
61
+ 'TWD' => 'Taiwan New Dollars',
62
+ 'THB' => 'Thai Baht',
63
+ 'TRY' => 'Turkish Lira',
64
+ 'VND' => 'Vietnamese Dong',
65
+ );
66
+ $out = '';
67
+ foreach ( $curr_arr as $key => $value ) {
68
+ if ( $selected !== false && $selected == $key ) {
69
+ $sel = ' selected';
70
+ } else {
71
+ $sel = '';
72
+ }
73
+ $out .= '<option value="' . $key . '"' . $sel . '>' . $value . '</option>';
74
+ }
75
+ return $out;
76
+ }
77
+ ?>
78
+
79
+ <div class="swpm-orange-box">
80
+ View the <a target="_blank" href="https://simple-membership-plugin.com/create-stripe-subscription-button-membership-payment/">documentation</a>&nbsp;
81
+ to learn how to create a Stripe Subscription payment button and use it.
82
+ </div>
83
+
84
+ <form id="stripe_subsciption_button_config_form" method="post">
85
+
86
+ <div class="postbox">
87
+ <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Stripe Subscription Button Configuration' ); ?></label></h3>
88
+ <div class="inside">
89
+ <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
90
+ <?php if ( ! $edit ) { ?>
91
+ <input type="hidden" name="button_type" value="<?php echo sanitize_text_field( $_REQUEST['button_type'] ); ?>">
92
+ <input type="hidden" name="swpm_button_type_selected" value="1">
93
+ <?php } else { ?>
94
+ <tr valign="top">
95
+ <th scope="row"><?php echo SwpmUtils::_( 'Button ID' ); ?></th>
96
+ <td>
97
+ <input type="text" size="10" name="button_id" value="<?php echo $opts['button_id']; ?>" readonly required />
98
+ <p class="description">This is the ID of this payment button. It is automatically generated for you and it cannot be changed.</p>
99
+ </td>
100
+ </tr>
101
+ <?php } ?>
102
+ <tr valign="top">
103
+ <th scope="row"><?php echo SwpmUtils::_( 'Button Title' ); ?></th>
104
+ <td>
105
+ <input type="text" size="50" name="button_name" value="<?php echo ( $edit ? $opts['button_title'] : '' ); ?>" required />
106
+ <p class="description">Give this membership payment button a name. Example: Gold membership payment</p>
107
+ </td>
108
+ </tr>
109
+
110
+ <tr valign="top">
111
+ <th scope="row"><?php echo SwpmUtils::_( 'Membership Level' ); ?></th>
112
+ <td>
113
+ <select id="membership_level_id" name="membership_level_id">
114
+ <?php echo ( $edit ? SwpmUtils::membership_level_dropdown( $opts['membership_level_id'][0] ) : SwpmUtils::membership_level_dropdown() ); ?>
115
+ </select>
116
+ <p class="description">Select the membership level this payment button is for.</p>
117
+ </td>
118
+ </tr>
119
+
120
+ <tr valign="top">
121
+ <th scope="row"><?php echo SwpmUtils::_( 'Stripe Plan ID' ); ?></th>
122
+ <td>
123
+ <input type="text" name="stripe_plan_id" value="<?php echo ( $edit ? $opts['stripe_plan_id'][0] : '' ); ?>" required />
124
+ <p class="description">
125
+ ID of the plan that you want subscribers to be assigned to. You can get more details in the
126
+ <a href="https://simple-membership-plugin.com/create-stripe-subscription-button-membership-payment/" target="_blank">documentation</a>.
127
+ </p>
128
+ </td>
129
+ </tr>
130
+
131
+ </table>
132
+
133
+ </div>
134
+ </div><!-- end of main button configuration box -->
135
+
136
+ <div class="postbox">
137
+ <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Stripe API Settings' ); ?></label></h3>
138
+ <div class="inside">
139
+
140
+ <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
141
+
142
+ <tr valign="top">
143
+ <th scope="row"><?php echo SwpmUtils::_( 'Use Global API Keys Settings' ); ?></th>
144
+ <td>
145
+ <input type="checkbox" name="stripe_use_global_keys" value="1" <?php echo $use_global_keys ? ' checked' : ''; ?> />
146
+ <p class="description"><?php echo SwpmUtils::_( 'Use API keys from <a href="admin.php?page=simple_wp_membership_settings&tab=2" target="_blank">Payment Settings</a> tab.' ); ?></p>
147
+ </td>
148
+ </tr>
149
+
150
+ <tr valign="top">
151
+ <th scope="row"><?php echo SwpmUtils::_( 'Test Publishable Key' ); ?></th>
152
+ <td>
153
+ <input type="text" size="100" name="stripe_test_publishable_key" value="<?php echo esc_attr( $edit ? $stripe_test_publishable_key : '' ); ?>" />
154
+ <p class="description">Enter your Stripe test publishable key.</p>
155
+ </td>
156
+ </tr>
157
+
158
+ <tr valign="top">
159
+ <th scope="row"><?php echo SwpmUtils::_( 'Test Secret Key' ); ?></th>
160
+ <td>
161
+ <input type="text" size="100" name="stripe_test_secret_key" value="<?php echo esc_attr( $edit ? $stripe_test_secret_key : '' ); ?>" />
162
+ <p class="description">Enter your Stripe test secret key.</p>
163
+ </td>
164
+ </tr>
165
+
166
+ <tr valign="top">
167
+ <th scope="row"><?php echo SwpmUtils::_( 'Live Publishable Key' ); ?></th>
168
+ <td>
169
+ <input type="text" size="100" name="stripe_live_publishable_key" value="<?php echo esc_attr( $edit ? $stripe_live_publishable_key : '' ); ?>" />
170
+ <p class="description">Enter your Stripe live publishable key.</p>
171
+ </td>
172
+ </tr>
173
+
174
+ <tr valign="top">
175
+ <th scope="row"><?php echo SwpmUtils::_( 'Live Secret Key' ); ?></th>
176
+ <td>
177
+ <input type="text" size="100" name="stripe_live_secret_key" value="<?php echo esc_attr( $edit ? $stripe_live_secret_key : '' ); ?>" />
178
+ <p class="description">Enter your Stripe live secret key.</p>
179
+ </td>
180
+ </tr>
181
+
182
+ <tr valign="top">
183
+ <th scope="row"><?php echo SwpmUtils::_( 'Webook Endpoint URL' ); ?></th>
184
+ <td>
185
+ <kbd><?php echo SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '/?swpm_process_stripe_subscription=1&hook=1'; ?></kbd>
186
+ <p class="description">You should create a new Webhook in your Stripe account and put this URL there if you want the plugin to handle subscription expiration automatically.<br />
187
+ You can get more info in the <a href="https://simple-membership-plugin.com/create-stripe-subscription-button-membership-payment/" target="_blank">documentation</a>.
188
+ </p>
189
+ </td>
190
+ </tr>
191
+
192
+ <script>
193
+ var swpmInputsArr = ['stripe_test_publishable_key', 'stripe_test_secret_key', 'stripe_live_publishable_key', 'stripe_live_secret_key'];
194
+ jQuery('input[name="stripe_use_global_keys"').change(function() {
195
+ var checked = jQuery(this).prop('checked');
196
+ jQuery.each(swpmInputsArr, function(index, el) {
197
+ jQuery('input[name="' + el + '"]').prop('disabled', checked);
198
+ });
199
+ });
200
+ jQuery('input[name="stripe_use_global_keys"').trigger('change');
201
+ </script>
202
+
203
+ </table>
204
+ </div>
205
+ </div><!-- end of Stripe API Keys box -->
206
+
207
+ <div class="postbox">
208
+ <h3 class="hndle"><label for="title"><?php echo SwpmUtils::_( 'Optional Details' ); ?></label></h3>
209
+ <div class="inside">
210
+
211
+ <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">
212
+
213
+ <tr valign="top">
214
+ <th scope="row"><?php echo SwpmUtils::_( 'Collect Customer Address' ); ?></th>
215
+ <td>
216
+ <input type="checkbox" name="collect_address" value="1" <?php echo ( $edit ? ( ( isset( $opts['stripe_collect_address'][0] ) && $opts['stripe_collect_address'][0] === '1' ) ? ' checked' : '' ) : '' ); ?> />
217
+ <p class="description">Enable this option if you want to collect customer address during Stripe checkout.</p>
218
+ </td>
219
+ </tr>
220
+
221
+ <tr valign="top">
222
+ <th scope="row"><?php echo SwpmUtils::_( 'Return URL' ); ?></th>
223
+ <td>
224
+ <input type="text" size="100" name="return_url" value="<?php echo ( $edit ? $opts['return_url'][0] : '' ); ?>" />
225
+ <p class="description">This is the URL the user will be redirected to after a successful payment. Enter the URL of your Thank You page here.</p>
226
+ </td>
227
+ </tr>
228
+
229
+ <tr valign="top">
230
+ <th scope="row"><?php echo SwpmUtils::_( 'Button Image URL' ); ?></th>
231
+ <td>
232
+ <input type="text" size="100" name="button_image_url" value="<?php echo ( $edit ? $opts['button_image_url'][0] : '' ); ?>" />
233
+ <p class="description">If you want to customize the look of the button using an image then enter the URL of the image.</p>
234
+ </td>
235
+ </tr>
236
+
237
+ </table>
238
+ </div>
239
+ </div><!-- end of optional details box -->
240
+
241
+ <p class="submit">
242
+ <?php wp_nonce_field( 'swpm_admin_add_edit_stripe_subs_btn', 'swpm_admin_add_edit_stripe_subs_btn' ); ?>
243
+ <input type="submit" name="swpm_stripe_subscription_<?php echo ( $edit ? 'edit' : 'save' ); ?>_submit" class="button-primary" value="<?php echo SwpmUtils::_( 'Save Payment Data' ); ?>">
244
+ </p>
245
+
246
+ </form>
247
+
248
+ <?php
249
  }
250
 
251
+ add_action( 'swpm_create_new_button_for_stripe_subscription', 'swpm_create_new_stripe_subscription_button' );
252
 
253
  function swpm_create_new_stripe_subscription_button() {
254
+ swpm_render_new_edit_stripe_subscription_button_interface( '' );
255
  }
256
 
257
+ add_action( 'swpm_edit_payment_button_for_stripe_subscription', 'swpm_edit_stripe_subscription_button' );
258
 
259
  function swpm_edit_stripe_subscription_button() {
260
+ //Retrieve the payment button data and present it for editing.
261
 
262
+ $button_id = sanitize_text_field( $_REQUEST['button_id'] );
263
+ $button_id = absint( $button_id );
264
 
265
+ $button = get_post( $button_id ); //Retrieve the CPT for this button
266
 
267
+ $post_meta = get_post_meta( $button_id );
268
+ $post_meta['button_title'] = $button->post_title;
269
+ $post_meta['button_id'] = $button_id;
270
 
271
+ swpm_render_new_edit_stripe_subscription_button_interface( $post_meta, true );
272
  }
273
 
274
  /*
275
  * Process submission and save the new PayPal Subscription payment button data
276
  */
277
+ add_action( 'swpm_create_new_button_process_submission', 'swpm_save_edit_stripe_subscription_button_data' );
278
+ add_action( 'swpm_edit_payment_button_process_submission', 'swpm_save_edit_stripe_subscription_button_data' );
279
 
280
  function swpm_save_edit_stripe_subscription_button_data() {
281
+ if ( isset( $_REQUEST['swpm_stripe_subscription_save_submit'] ) ) {
282
+ $edit = false;
283
+ }
284
+ if ( isset( $_REQUEST['swpm_stripe_subscription_edit_submit'] ) ) {
285
+ $edit = true;
286
+ }
287
+ if ( isset( $edit ) ) {
288
+ //This is a Stripe subscription button save or edit event. Process the submission.
289
+ check_admin_referer( 'swpm_admin_add_edit_stripe_subs_btn', 'swpm_admin_add_edit_stripe_subs_btn' );
290
+ if ( $edit ) {
291
+ $button_id = sanitize_text_field( $_REQUEST['button_id'] );
292
+ $button_id = absint( $button_id );
293
+ $button_type = sanitize_text_field( $_REQUEST['button_type'] );
294
+ $button_name = sanitize_text_field( $_REQUEST['button_name'] );
295
+
296
+ $button_post = array(
297
+ 'ID' => $button_id,
298
+ 'post_title' => $button_name,
299
+ 'post_type' => 'swpm_payment_button',
300
+ );
301
+ wp_update_post( $button_post );
302
+ } else {
303
+ $button_id = wp_insert_post(
304
+ array(
305
+ 'post_title' => sanitize_text_field( $_REQUEST['button_name'] ),
306
+ 'post_type' => 'swpm_payment_button',
307
+ 'post_content' => '',
308
+ 'post_status' => 'publish',
309
+ )
310
+ );
311
+ $button_type = sanitize_text_field( $_REQUEST['button_type'] );
312
+ }
313
+
314
+ update_post_meta( $button_id, 'button_type', $button_type );
315
+ update_post_meta( $button_id, 'membership_level_id', sanitize_text_field( $_REQUEST['membership_level_id'] ) );
316
+ update_post_meta( $button_id, 'return_url', trim( sanitize_text_field( $_REQUEST['return_url'] ) ) );
317
+ update_post_meta( $button_id, 'button_image_url', trim( sanitize_text_field( $_REQUEST['button_image_url'] ) ) );
318
+ update_post_meta( $button_id, 'stripe_collect_address', isset( $_POST['collect_address'] ) ? '1' : '' );
319
+
320
+ //API details
321
+ $stripe_test_secret_key = filter_input( INPUT_POST, 'stripe_test_secret_key', FILTER_SANITIZE_STRING );
322
+ $stripe_test_publishable_key = filter_input( INPUT_POST, 'stripe_test_publishable_key', FILTER_SANITIZE_STRING );
323
+ $stripe_live_secret_key = filter_input( INPUT_POST, 'stripe_live_secret_key', FILTER_SANITIZE_STRING );
324
+ $stripe_live_publishable_key = filter_input( INPUT_POST, 'stripe_live_publishable_key', FILTER_SANITIZE_STRING );
325
+ if ( isset( $stripe_test_secret_key ) ) {
326
+ update_post_meta( $button_id, 'stripe_test_secret_key', sanitize_text_field( $stripe_test_secret_key ) );
327
+ }
328
+ if ( isset( $stripe_test_publishable_key ) ) {
329
+ update_post_meta( $button_id, 'stripe_test_publishable_key', sanitize_text_field( $stripe_test_publishable_key ) );
330
+ }
331
+ if ( isset( $stripe_live_secret_key ) ) {
332
+ update_post_meta( $button_id, 'stripe_live_secret_key', sanitize_text_field( $stripe_live_secret_key ) );
333
+ }
334
+ if ( isset( $stripe_live_publishable_key ) ) {
335
+ update_post_meta( $button_id, 'stripe_live_publishable_key', sanitize_text_field( $stripe_live_publishable_key ) );
336
+ }
337
+
338
+ $stripe_use_global_keys = filter_input( INPUT_POST, 'stripe_use_global_keys', FILTER_SANITIZE_NUMBER_INT );
339
+ $stripe_use_global_keys = $stripe_use_global_keys ? true : false;
340
+
341
+ update_post_meta( $button_id, 'stripe_use_global_keys', $stripe_use_global_keys );
342
+
343
+ if ( $edit ) {
344
+ // let's see if Stripe details (plan ID and Secret Key) are valid
345
+ $stripe_error_msg = '';
346
+ $settings = SwpmSettings::get_instance();
347
+ $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
348
+ if ( $sandbox_enabled ) {
349
+ $secret_key = $stripe_test_secret_key ? $stripe_test_secret_key : $settings->get_value( 'stripe-test-secret-key' );
350
+ } else {
351
+ $secret_key = $stripe_live_secret_key ? $stripe_live_secret_key : $settings->get_value( 'stripe-live-secret-key' );
352
+ }
353
+
354
+ require_once SIMPLE_WP_MEMBERSHIP_PATH . 'lib/stripe-util-functions.php';
355
+ $result = StripeUtilFunctions::get_stripe_plan_info( $secret_key, sanitize_text_field( $_REQUEST['stripe_plan_id'] ) );
356
+ if ( $result['success'] ) {
357
+ $plan_data = $result['plan_data'];
358
+ } else {
359
+ $stripe_error_msg = $result['error_msg'];
360
+ }
361
+ }
362
+
363
+ //Subscription billing details
364
+ update_post_meta( $button_id, 'stripe_plan_id', sanitize_text_field( $_REQUEST['stripe_plan_id'] ) );
365
+ update_post_meta( $button_id, 'stripe_plan_data', ( isset( $plan_data ) ? $plan_data : false ) );
366
+
367
+ if ( $edit ) {
368
+ if ( empty( $stripe_error_msg ) ) {
369
+ echo '<div id="message" class="updated fade"><p>Payment button data successfully updated!</p></div>';
370
+ } else {
371
+ echo '<div id="message" class="error"><p>' . $stripe_error_msg . '</p></div>';
372
+ }
373
+ } else {
374
+ //Redirect to the edit interface of this button with $button_id
375
+ $url = admin_url() . 'admin.php?page=simple_wp_membership_payments&tab=edit_button&button_id=' . $button_id . '&button_type=' . $button_type;
376
+ SwpmMiscUtils::redirect_to_url( $url );
377
+ }
378
+ }
379
  }
views/payments/payment-gateway/stripe_button_shortcode_view.php CHANGED
@@ -1,313 +1,313 @@
1
- <?php
2
-
3
- /* * ************************************************
4
- * Stripe Buy Now button shortcode handler
5
- * *********************************************** */
6
- add_filter('swpm_payment_button_shortcode_for_stripe_buy_now', 'swpm_render_stripe_buy_now_button_sc_output', 10, 2);
7
-
8
- function swpm_render_stripe_buy_now_button_sc_output($button_code, $args) {
9
-
10
- $button_id = isset($args['id']) ? $args['id'] : '';
11
- if (empty($button_id)) {
12
- return '<p class="swpm-red-box">Error! swpm_render_stripe_buy_now_button_sc_output() function requires the button ID value to be passed to it.</p>';
13
- }
14
-
15
- //Get class option for button styling, set Stripe's default if none specified
16
- $class = isset($args['class']) ? $args['class'] : 'stripe-button-el';
17
-
18
- //Check new_window parameter
19
- $window_target = isset($args['new_window']) ? 'target="_blank"' : '';
20
- $button_text = (isset($args['button_text'])) ? esc_attr($args['button_text']) : SwpmUtils::_('Buy Now');
21
-
22
- $item_logo = ''; //Can be used to show an item logo or thumbnail in the checkout form.
23
-
24
- $settings = SwpmSettings::get_instance();
25
- $button_cpt = get_post($button_id); //Retrieve the CPT for this button
26
- $item_name = htmlspecialchars($button_cpt->post_title);
27
-
28
- $membership_level_id = get_post_meta($button_id, 'membership_level_id', true);
29
- //Verify that this membership level exists (to prevent user paying for a level that has been deleted)
30
- if (!SwpmUtils::membership_level_id_exists($membership_level_id)) {
31
- return '<p class="swpm-red-box">Error! The membership level specified in this button does not exist. You may have deleted this membership level. Edit the button and use the correct membership level.</p>';
32
- }
33
-
34
- //Payment amount and currency
35
- $payment_amount = get_post_meta($button_id, 'payment_amount', true);
36
- if (!is_numeric($payment_amount)) {
37
- return '<p class="swpm-red-box">Error! The payment amount value of the button must be a numeric number. Example: 49.50 </p>';
38
- }
39
- $payment_currency = get_post_meta($button_id, 'payment_currency', true);
40
- $payment_amount = round($payment_amount, 2); //round the amount to 2 decimal place.
41
- $zeroCents = unserialize(SIMPLE_WP_MEMBERSHIP_STRIPE_ZERO_CENTS);
42
- if (in_array($payment_currency, $zeroCents)) {
43
- //this is zero-cents currency, amount shouldn't be multiplied by 100
44
- $price_in_cents = $payment_amount;
45
- } else {
46
- $price_in_cents = $payment_amount * 100; //The amount (in cents). This value is passed to Stripe API.
47
- }
48
- $payment_amount_formatted=SwpmMiscUtils::format_money($payment_amount,$payment_currency);
49
- //Return, cancel, notifiy URLs
50
- $notify_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '/?swpm_process_stripe_buy_now=1'; //We are going to use it to do post payment processing.
51
- //$button_image_url = get_post_meta($button_id, 'button_image_url', true);//Stripe doesn't currenty support button image for their standard checkout.
52
- //User's IP address
53
- $user_ip = SwpmUtils::get_user_ip_address();
54
- $_SESSION['swpm_payment_button_interaction'] = $user_ip;
55
-
56
- //Custom field data
57
- $custom_field_value = 'subsc_ref=' . $membership_level_id;
58
- $custom_field_value .= '&user_ip=' . $user_ip;
59
- if (SwpmMemberUtils::is_member_logged_in()) {
60
- $custom_field_value .= '&swpm_id=' . SwpmMemberUtils::get_logged_in_members_id();
61
- }
62
- $custom_field_value = apply_filters('swpm_custom_field_value_filter', $custom_field_value);
63
-
64
- //Sandbox settings
65
- $sandbox_enabled = $settings->get_value('enable-sandbox-testing');
66
-
67
- //API keys
68
- $stripe_test_secret_key = get_post_meta($button_id, 'stripe_test_secret_key', true);
69
- $stripe_test_publishable_key = get_post_meta($button_id, 'stripe_test_publishable_key', true);
70
- $stripe_live_secret_key = get_post_meta($button_id, 'stripe_live_secret_key', true);
71
- $stripe_live_publishable_key = get_post_meta($button_id, 'stripe_live_publishable_key', true);
72
- if ($sandbox_enabled) {
73
- $publishable_key = $stripe_test_publishable_key; //Use sandbox API key
74
- } else {
75
- $publishable_key = $stripe_live_publishable_key; //Use live API key
76
- }
77
-
78
- //Billing address
79
- $billing_address = isset($args['billing_address']) ? '1' : '';
80
- //By default don't show the billing address in the checkout form.
81
- //if billing_address parameter is not present in the shortcode, let's check button option
82
- if ($billing_address === '') {
83
- $collect_address = get_post_meta($button_id, 'stripe_collect_address', true);
84
- if ($collect_address === '1') {
85
- //Collect Address enabled in button settings
86
- $billing_address = 1;
87
- }
88
- }
89
-
90
- $uniqid=uniqid();
91
-
92
- /* === Stripe Buy Now Button Form === */
93
- $output = '';
94
- $output .= '<div class="swpm-button-wrapper swpm-stripe-buy-now-wrapper">';
95
- $output .= "<form id='swpm-stripe-payment-form-".$uniqid."' action='" . $notify_url . "' METHOD='POST'> ";
96
- $output .= "<div style='display: none !important'>";
97
- $output .= "<script src='https://checkout.stripe.com/checkout.js' class='stripe-button'
98
- data-key='" . $publishable_key . "'
99
- data-panel-label='Pay'
100
- data-amount='{$price_in_cents}'
101
- data-name='{$item_name}'";
102
- $output .= "data-description='{$payment_amount_formatted}'";
103
- $output .= "data-locale='auto'";
104
- $output .= "data-label='{$button_text}'"; //Stripe doesn't currenty support button image for their standard checkout.
105
- $output .= "data-currency='{$payment_currency}'";
106
- if (!empty($item_logo)) {//Show item logo/thumbnail in the stripe payment window
107
- $output .= "data-image='{$item_logo}'";
108
- }
109
- if (!empty($billing_address)) {//Show billing address in the stipe payment window
110
- $output .= "data-billing-address='true'";
111
- }
112
- $output .= apply_filters('swpm_stripe_additional_checkout_data_parameters', ''); //Filter to allow the addition of extra data parameters for stripe checkout.
113
- $output .= "></script>";
114
- $output .= '</div>';
115
-
116
- //apply filter to output additional form fields
117
- $coupon_input='';
118
- $coupon_input = apply_filters('swpm_payment_form_additional_fields',$coupon_input,$button_id,$uniqid);
119
- if (!empty($coupon_input)) {
120
- $output.=$coupon_input;
121
- }
122
-
123
- $button_image_url = get_post_meta($button_id, 'button_image_url', true);
124
- if (!empty($button_image_url)) {
125
- $output .= '<input type="image" src="' . $button_image_url . '" class="' . $class . '" alt="' . $button_text . '" title="' . $button_text . '" />';
126
- } else {
127
- $output .= "<button id='{$button_id}' type='submit' class='{$class}'><span>{$button_text}</span></button>";
128
- }
129
-
130
- $output .= wp_nonce_field('stripe_payments', '_wpnonce', true, false);
131
- $output .= '<input type="hidden" name="item_number" value="' . $button_id . '" />';
132
- $output .= "<input type='hidden' value='{$item_name}' name='item_name' />";
133
- $output .= "<input type='hidden' value='{$payment_amount}' name='item_price' />";
134
- $output .= "<input type='hidden' value='{$payment_currency}' name='currency_code' />";
135
- $output .= "<input type='hidden' value='{$custom_field_value}' name='custom' />";
136
-
137
- //Filter to add additional payment input fields to the form.
138
- $output .= apply_filters('swpm_stripe_payment_form_additional_fields', '');
139
-
140
- $output .= "</form>";
141
- $output .= '</div>'; //End .swpm_button_wrapper
142
-
143
- return $output;
144
- }
145
-
146
- add_filter('swpm_payment_button_shortcode_for_stripe_subscription', 'swpm_render_stripe_subscription_button_sc_output', 10, 2);
147
-
148
- function swpm_render_stripe_subscription_button_sc_output($button_code, $args) {
149
-
150
- $button_id = isset($args['id']) ? $args['id'] : '';
151
- if (empty($button_id)) {
152
- return '<p class="swpm-red-box">Error! swpm_render_stripe_buy_now_button_sc_output() function requires the button ID value to be passed to it.</p>';
153
- }
154
-
155
- //Get class option for button styling, set Stripe's default if none specified
156
- $class = isset($args['class']) ? $args['class'] : 'stripe-button-el';
157
-
158
- //Check new_window parameter
159
- $window_target = isset($args['new_window']) ? 'target="_blank"' : '';
160
- $button_text = (isset($args['button_text'])) ? esc_attr($args['button_text']) : SwpmUtils::_('Buy Now');
161
- $item_logo = ''; //Can be used to show an item logo or thumbnail in the checkout form.
162
-
163
- $settings = SwpmSettings::get_instance();
164
- $button_cpt = get_post($button_id); //Retrieve the CPT for this button
165
- $item_name = htmlspecialchars($button_cpt->post_title);
166
-
167
- $membership_level_id = get_post_meta($button_id, 'membership_level_id', true);
168
- //Verify that this membership level exists (to prevent user paying for a level that has been deleted)
169
- if (!SwpmUtils::membership_level_id_exists($membership_level_id)) {
170
- return '<p class="swpm-red-box">Error! The membership level specified in this button does not exist. You may have deleted this membership level. Edit the button and use the correct membership level.</p>';
171
- }
172
-
173
- //Return, cancel, notifiy URLs
174
- $notify_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '/?swpm_process_stripe_subscription=1'; //We are going to use it to do post payment processing.
175
- //$button_image_url = get_post_meta($button_id, 'button_image_url', true);//Stripe doesn't currenty support button image for their standard checkout.
176
- //User's IP address
177
- $user_ip = SwpmUtils::get_user_ip_address();
178
- $_SESSION['swpm_payment_button_interaction'] = $user_ip;
179
-
180
- //Custom field data
181
- $custom_field_value = 'subsc_ref=' . $membership_level_id;
182
- $custom_field_value .= '&user_ip=' . $user_ip;
183
- if (SwpmMemberUtils::is_member_logged_in()) {
184
- $custom_field_value .= '&swpm_id=' . SwpmMemberUtils::get_logged_in_members_id();
185
- }
186
- $custom_field_value = apply_filters('swpm_custom_field_value_filter', $custom_field_value);
187
-
188
- //Sandbox settings
189
- $sandbox_enabled = $settings->get_value('enable-sandbox-testing');
190
-
191
- //API keys
192
- $stripe_test_secret_key = get_post_meta($button_id, 'stripe_test_secret_key', true);
193
- $stripe_test_publishable_key = get_post_meta($button_id, 'stripe_test_publishable_key', true);
194
- $stripe_live_secret_key = get_post_meta($button_id, 'stripe_live_secret_key', true);
195
- $stripe_live_publishable_key = get_post_meta($button_id, 'stripe_live_publishable_key', true);
196
- if ($sandbox_enabled) {
197
- $secret_key = $stripe_test_secret_key;
198
- $publishable_key = $stripe_test_publishable_key; //Use sandbox API key
199
- } else {
200
- $secret_key = $stripe_live_secret_key;
201
- $publishable_key = $stripe_live_publishable_key; //Use live API key
202
- }
203
-
204
- $plan_id = get_post_meta($button_id, 'stripe_plan_id', true);
205
-
206
- $plan_data = get_post_meta($button_id, 'stripe_plan_data', true);
207
-
208
- if (empty($plan_data)) {
209
- //no plan data available, let's try to request one
210
-
211
- if (version_compare(PHP_VERSION, '5.4.0', '<')) {
212
- //This server's PHP version can't handle the library.
213
- $error_msg = '<div class="swpm-red-box">';
214
- $error_msg .= '<p>The Stripe Subscription payment gateway library requires at least PHP 5.4.0. Your server is using a very old version of PHP.</p>';
215
- $error_msg .= '<p>Request your hosting provider to upgrade your PHP to a more recent version then you will be able to use the Stripe Subscription.<p>';
216
- $error_msg .= '</div>';
217
- return $error_msg;
218
- }
219
-
220
- require_once(SIMPLE_WP_MEMBERSHIP_PATH . 'lib/stripe-util-functions.php');
221
- $result = StripeUtilFunctions::get_stripe_plan_info($secret_key, $plan_id);
222
- if ($result['success'] === false) {
223
- // some error occurred, let's display it and stop processing the shortcode further
224
- return '<p class="swpm-red-box">Stripe error occurred: ' . $result['error_msg'] . '</p>';
225
- } else {
226
- // plan data has been successfully retreived
227
- $plan_data = $result['plan_data'];
228
- // Let's update post_meta in order to not re-request the data again on each button display
229
- update_post_meta($button_id, 'stripe_plan_data', $plan_data);
230
- }
231
- }
232
-
233
- //let's set some vars
234
- $price_in_cents = $plan_data['amount'];
235
- $payment_currency = strtoupper($plan_data['currency']);
236
- $zeroCents = unserialize(SIMPLE_WP_MEMBERSHIP_STRIPE_ZERO_CENTS);
237
- if (in_array($payment_currency, $zeroCents)) {
238
- //this is zero-cents currency, amount shouldn't be devided by 100
239
- $payment_amount = $price_in_cents;
240
- } else {
241
- $payment_amount = $price_in_cents / 100;
242
- }
243
- $interval_count = $plan_data['interval_count'];
244
- $interval = $plan_data['interval'];
245
- $trial = $plan_data['trial_period_days'];
246
- $plan_name = $plan_data['name'];
247
- $description = $payment_amount . ' ' . $payment_currency;
248
- if ($interval_count == 1) {
249
- $description .= ' / ' . $interval;
250
- } else {
251
- $description .= ' every ' . $plan_data['interval_count'] . ' ' . $plan_data['interval'] . 's';
252
- }
253
- // this should add info on trial period if available, but Stripe strips too long strings, so we leave it commented out for now.
254
- // if ($trial != NULL) {
255
- // $description .= '. '.$trial . ' days FREE trial.';
256
- // }
257
- //Billing address
258
- $billing_address = isset($args['billing_address']) ? '1' : '';
259
- //By default don't show the billing address in the checkout form.
260
- //if billing_address parameter is not present in the shortcode, let's check button option
261
- if ($billing_address === '') {
262
- $collect_address = get_post_meta($button_id, 'stripe_collect_address', true);
263
- if ($collect_address === '1') {
264
- //Collect Address enabled in button settings
265
- $billing_address = 1;
266
- }
267
- }
268
-
269
- /* === Stripe Buy Now Button Form === */
270
- $output = '';
271
- $output .= '<div class="swpm-button-wrapper swpm-stripe-buy-now-wrapper">';
272
- $output .= "<form action='" . $notify_url . "' METHOD='POST'> ";
273
- $output .= "<div style='display: none !important'>";
274
- $output .= "<script src='https://checkout.stripe.com/checkout.js' class='stripe-button'
275
- data-key='" . $publishable_key . "'
276
- data-panel-label='Sign Me Up!'
277
- data-name='{$item_name}'";
278
- $output .= "data-description='{$description}'";
279
- $output .= "data-locale='auto'";
280
- $output .= "data-label='{$button_text}'"; //Stripe doesn't currenty support button image for their standard checkout.
281
- $output .= "data-currency='{$payment_currency}'";
282
- if (!empty($item_logo)) {//Show item logo/thumbnail in the stripe payment window
283
- $output .= "data-image='{$item_logo}'";
284
- }
285
- if (!empty($billing_address)) {//Show billing address in the stipe payment window
286
- $output .= "data-billing-address='true'";
287
- }
288
- $output .= apply_filters('swpm_stripe_additional_checkout_data_parameters', ''); //Filter to allow the addition of extra data parameters for stripe checkout.
289
- $output .= "></script>";
290
- $output .= '</div>';
291
-
292
- $button_image_url = get_post_meta($button_id, 'button_image_url', true);
293
- if (!empty($button_image_url)) {
294
- $output .= '<input type="image" src="' . $button_image_url . '" class="' . $class . '" alt="' . $button_text . '" title="' . $button_text . '" />';
295
- } else {
296
- $output .= "<button id='{$button_id}' type='submit' class='{$class}'><span>{$button_text}</span></button>";
297
- }
298
-
299
- $output .= wp_nonce_field('stripe_payments', '_wpnonce', true, false);
300
- $output .= '<input type="hidden" name="item_number" value="' . $button_id . '" />';
301
- $output .= "<input type='hidden' value='{$item_name}' name='item_name' />";
302
- $output .= "<input type='hidden' value='{$payment_amount}' name='item_price' />";
303
- $output .= "<input type='hidden' value='{$payment_currency}' name='currency_code' />";
304
- $output .= "<input type='hidden' value='{$custom_field_value}' name='custom' />";
305
-
306
- //Filter to add additional payment input fields to the form.
307
- $output .= apply_filters('swpm_stripe_payment_form_additional_fields', '');
308
-
309
- $output .= "</form>";
310
- $output .= '</div>'; //End .swpm_button_wrapper
311
-
312
- return $output;
313
- }
1
+ <?php
2
+
3
+ /* * ************************************************
4
+ * Stripe Buy Now button shortcode handler
5
+ * *********************************************** */
6
+ add_filter( 'swpm_payment_button_shortcode_for_stripe_buy_now', 'swpm_render_stripe_buy_now_button_sc_output', 10, 2 );
7
+
8
+ function swpm_render_stripe_buy_now_button_sc_output( $button_code, $args ) {
9
+
10
+ $button_id = isset( $args['id'] ) ? $args['id'] : '';
11
+ if ( empty( $button_id ) ) {
12
+ return '<p class="swpm-red-box">Error! swpm_render_stripe_buy_now_button_sc_output() function requires the button ID value to be passed to it.</p>';
13
+ }
14
+
15
+ //Get class option for button styling, set Stripe's default if none specified
16
+ $class = isset( $args['class'] ) ? $args['class'] : 'stripe-button-el';
17
+
18
+ //Check new_window parameter
19
+ $window_target = isset( $args['new_window'] ) ? 'target="_blank"' : '';
20
+ $button_text = ( isset( $args['button_text'] ) ) ? esc_attr( $args['button_text'] ) : SwpmUtils::_( 'Buy Now' );
21
+
22
+ $item_logo = ''; //Can be used to show an item logo or thumbnail in the checkout form.
23
+
24
+ $settings = SwpmSettings::get_instance();
25
+ $button_cpt = get_post( $button_id ); //Retrieve the CPT for this button
26
+ $item_name = htmlspecialchars( $button_cpt->post_title );
27
+
28
+ $membership_level_id = get_post_meta( $button_id, 'membership_level_id', true );
29
+ //Verify that this membership level exists (to prevent user paying for a level that has been deleted)
30
+ if ( ! SwpmUtils::membership_level_id_exists( $membership_level_id ) ) {
31
+ return '<p class="swpm-red-box">Error! The membership level specified in this button does not exist. You may have deleted this membership level. Edit the button and use the correct membership level.</p>';
32
+ }
33
+
34
+ //Payment amount and currency
35
+ $payment_amount = get_post_meta( $button_id, 'payment_amount', true );
36
+ if ( ! is_numeric( $payment_amount ) ) {
37
+ return '<p class="swpm-red-box">Error! The payment amount value of the button must be a numeric number. Example: 49.50 </p>';
38
+ }
39
+ $payment_currency = get_post_meta( $button_id, 'payment_currency', true );
40
+ $payment_amount = round( $payment_amount, 2 ); //round the amount to 2 decimal place.
41
+ $zeroCents = unserialize( SIMPLE_WP_MEMBERSHIP_STRIPE_ZERO_CENTS );
42
+ if ( in_array( $payment_currency, $zeroCents ) ) {
43
+ //this is zero-cents currency, amount shouldn't be multiplied by 100
44
+ $price_in_cents = $payment_amount;
45
+ } else {
46
+ $price_in_cents = $payment_amount * 100; //The amount (in cents). This value is passed to Stripe API.
47
+ }
48
+ $payment_amount_formatted = SwpmMiscUtils::format_money( $payment_amount, $payment_currency );
49
+ //Return, cancel, notifiy URLs
50
+ $notify_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '/?swpm_process_stripe_buy_now=1'; //We are going to use it to do post payment processing.
51
+ //$button_image_url = get_post_meta($button_id, 'button_image_url', true);//Stripe doesn't currenty support button image for their standard checkout.
52
+ //User's IP address
53
+ $user_ip = SwpmUtils::get_user_ip_address();
54
+ $_SESSION['swpm_payment_button_interaction'] = $user_ip;
55
+
56
+ //Custom field data
57
+ $custom_field_value = 'subsc_ref=' . $membership_level_id;
58
+ $custom_field_value .= '&user_ip=' . $user_ip;
59
+ if ( SwpmMemberUtils::is_member_logged_in() ) {
60
+ $custom_field_value .= '&swpm_id=' . SwpmMemberUtils::get_logged_in_members_id();
61
+ }
62
+ $custom_field_value = apply_filters( 'swpm_custom_field_value_filter', $custom_field_value );
63
+
64
+ //Sandbox settings
65
+ $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
66
+
67
+ //API keys
68
+ $api_keys = SwpmMiscUtils::get_stripe_api_keys_from_payment_button( $button_id, ! $sandbox_enabled );
69
+
70
+ //prefill member email
71
+ $prefill_member_email = $settings->get_value( 'stripe-prefill-member-email' );
72
+
73
+ if ( $prefill_member_email ) {
74
+ $auth = SwpmAuth::get_instance();
75
+ $member_email = $auth->get( 'email' );
76
+ }
77
+
78
+ //Billing address
79
+ $billing_address = isset( $args['billing_address'] ) ? '1' : '';
80
+ //By default don't show the billing address in the checkout form.
81
+ //if billing_address parameter is not present in the shortcode, let's check button option
82
+ if ( $billing_address === '' ) {
83
+ $collect_address = get_post_meta( $button_id, 'stripe_collect_address', true );
84
+ if ( $collect_address === '1' ) {
85
+ //Collect Address enabled in button settings
86
+ $billing_address = 1;
87
+ }
88
+ }
89
+
90
+ $uniqid = uniqid();
91
+
92
+ /* === Stripe Buy Now Button Form === */
93
+ $output = '';
94
+ $output .= '<div class="swpm-button-wrapper swpm-stripe-buy-now-wrapper">';
95
+ $output .= "<form id='swpm-stripe-payment-form-" . $uniqid . "' action='" . $notify_url . "' METHOD='POST'> ";
96
+ $output .= "<div style='display: none !important'>";
97
+ $output .= "<script src='https://checkout.stripe.com/checkout.js' class='stripe-button'
98
+ data-key='" . $api_keys['public'] . "'
99
+ data-panel-label='Pay'
100
+ data-amount='{$price_in_cents}'
101
+ data-name='{$item_name}'";
102
+ $output .= isset( $member_email ) ? sprintf( 'data-email="%s"', $member_email ) : '';
103
+ $output .= "data-description='{$payment_amount_formatted}'";
104
+ $output .= "data-locale='auto'";
105
+ $output .= "data-label='{$button_text}'"; //Stripe doesn't currenty support button image for their standard checkout.
106
+ $output .= "data-currency='{$payment_currency}'";
107
+ if ( ! empty( $item_logo ) ) {//Show item logo/thumbnail in the stripe payment window
108
+ $output .= "data-image='{$item_logo}'";
109
+ }
110
+ if ( ! empty( $billing_address ) ) {//Show billing address in the stipe payment window
111
+ $output .= "data-billing-address='true'";
112
+ }
113
+ $output .= apply_filters( 'swpm_stripe_additional_checkout_data_parameters', '' ); //Filter to allow the addition of extra data parameters for stripe checkout.
114
+ $output .= '></script>';
115
+ $output .= '</div>';
116
+
117
+ //apply filter to output additional form fields
118
+ $coupon_input = '';
119
+ $coupon_input = apply_filters( 'swpm_payment_form_additional_fields', $coupon_input, $button_id, $uniqid );
120
+ if ( ! empty( $coupon_input ) ) {
121
+ $output .= $coupon_input;
122
+ }
123
+
124
+ $button_image_url = get_post_meta( $button_id, 'button_image_url', true );
125
+ if ( ! empty( $button_image_url ) ) {
126
+ $output .= '<input type="image" src="' . $button_image_url . '" class="' . $class . '" alt="' . $button_text . '" title="' . $button_text . '" />';
127
+ } else {
128
+ $output .= "<button id='{$button_id}' type='submit' class='{$class}'><span>{$button_text}</span></button>";
129
+ }
130
+
131
+ $output .= wp_nonce_field( 'stripe_payments', '_wpnonce', true, false );
132
+ $output .= '<input type="hidden" name="item_number" value="' . $button_id . '" />';
133
+ $output .= "<input type='hidden' value='{$item_name}' name='item_name' />";
134
+ $output .= "<input type='hidden' value='{$payment_amount}' name='item_price' />";
135
+ $output .= "<input type='hidden' value='{$payment_currency}' name='currency_code' />";
136
+ $output .= "<input type='hidden' value='{$custom_field_value}' name='custom' />";
137
+
138
+ //Filter to add additional payment input fields to the form.
139
+ $output .= apply_filters( 'swpm_stripe_payment_form_additional_fields', '' );
140
+
141
+ $output .= '</form>';
142
+ $output .= '</div>'; //End .swpm_button_wrapper
143
+
144
+ return $output;
145
+ }
146
+
147
+ add_filter( 'swpm_payment_button_shortcode_for_stripe_subscription', 'swpm_render_stripe_subscription_button_sc_output', 10, 2 );
148
+
149
+ function swpm_render_stripe_subscription_button_sc_output( $button_code, $args ) {
150
+
151
+ $button_id = isset( $args['id'] ) ? $args['id'] : '';
152
+ if ( empty( $button_id ) ) {
153
+ return '<p class="swpm-red-box">Error! swpm_render_stripe_buy_now_button_sc_output() function requires the button ID value to be passed to it.</p>';
154
+ }
155
+
156
+ //Get class option for button styling, set Stripe's default if none specified
157
+ $class = isset( $args['class'] ) ? $args['class'] : 'stripe-button-el';
158
+
159
+ //Check new_window parameter
160
+ $window_target = isset( $args['new_window'] ) ? 'target="_blank"' : '';
161
+ $button_text = ( isset( $args['button_text'] ) ) ? esc_attr( $args['button_text'] ) : SwpmUtils::_( 'Buy Now' );
162
+ $item_logo = ''; //Can be used to show an item logo or thumbnail in the checkout form.
163
+
164
+ $settings = SwpmSettings::get_instance();
165
+ $button_cpt = get_post( $button_id ); //Retrieve the CPT for this button
166
+ $item_name = htmlspecialchars( $button_cpt->post_title );
167
+
168
+ $membership_level_id = get_post_meta( $button_id, 'membership_level_id', true );
169
+ //Verify that this membership level exists (to prevent user paying for a level that has been deleted)
170
+ if ( ! SwpmUtils::membership_level_id_exists( $membership_level_id ) ) {
171
+ return '<p class="swpm-red-box">Error! The membership level specified in this button does not exist. You may have deleted this membership level. Edit the button and use the correct membership level.</p>';
172
+ }
173
+
174
+ //Return, cancel, notifiy URLs
175
+ $notify_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '/?swpm_process_stripe_subscription=1'; //We are going to use it to do post payment processing.
176
+ //$button_image_url = get_post_meta($button_id, 'button_image_url', true);//Stripe doesn't currenty support button image for their standard checkout.
177
+ //User's IP address
178
+ $user_ip = SwpmUtils::get_user_ip_address();
179
+ $_SESSION['swpm_payment_button_interaction'] = $user_ip;
180
+
181
+ //Custom field data
182
+ $custom_field_value = 'subsc_ref=' . $membership_level_id;
183
+ $custom_field_value .= '&user_ip=' . $user_ip;
184
+ if ( SwpmMemberUtils::is_member_logged_in() ) {
185
+ $custom_field_value .= '&swpm_id=' . SwpmMemberUtils::get_logged_in_members_id();
186
+ }
187
+ $custom_field_value = apply_filters( 'swpm_custom_field_value_filter', $custom_field_value );
188
+
189
+ //Sandbox settings
190
+ $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
191
+
192
+ //API keys
193
+ $api_keys = SwpmMiscUtils::get_stripe_api_keys_from_payment_button( $button_id, ! $sandbox_enabled );
194
+
195
+ //prefill member email
196
+ $prefill_member_email = $settings->get_value( 'stripe-prefill-member-email' );
197
+
198
+ if ( $prefill_member_email ) {
199
+ $auth = SwpmAuth::get_instance();
200
+ $member_email = $auth->get( 'email' );
201
+ }
202
+
203
+ $plan_id = get_post_meta( $button_id, 'stripe_plan_id', true );
204
+
205
+ $plan_data = get_post_meta( $button_id, 'stripe_plan_data', true );
206
+
207
+ if ( empty( $plan_data ) ) {
208
+ //no plan data available, let's try to request one
209
+
210
+ if ( version_compare( PHP_VERSION, '5.4.0', '<' ) ) {
211
+ //This server's PHP version can't handle the library.
212
+ $error_msg = '<div class="swpm-red-box">';
213
+ $error_msg .= '<p>The Stripe Subscription payment gateway library requires at least PHP 5.4.0. Your server is using a very old version of PHP.</p>';
214
+ $error_msg .= '<p>Request your hosting provider to upgrade your PHP to a more recent version then you will be able to use the Stripe Subscription.<p>';
215
+ $error_msg .= '</div>';
216
+ return $error_msg;
217
+ }
218
+
219
+ require_once SIMPLE_WP_MEMBERSHIP_PATH . 'lib/stripe-util-functions.php';
220
+ $result = StripeUtilFunctions::get_stripe_plan_info( $api_keys['secret'], $plan_id );
221
+ if ( $result['success'] === false ) {
222
+ // some error occurred, let's display it and stop processing the shortcode further
223
+ return '<p class="swpm-red-box">Stripe error occurred: ' . $result['error_msg'] . '</p>';
224
+ } else {
225
+ // plan data has been successfully retreived
226
+ $plan_data = $result['plan_data'];
227
+ // Let's update post_meta in order to not re-request the data again on each button display
228
+ update_post_meta( $button_id, 'stripe_plan_data', $plan_data );
229
+ }
230
+ }
231
+
232
+ //let's set some vars
233
+ $price_in_cents = $plan_data['amount'];
234
+ $payment_currency = strtoupper( $plan_data['currency'] );
235
+ $zeroCents = unserialize( SIMPLE_WP_MEMBERSHIP_STRIPE_ZERO_CENTS );
236
+ if ( in_array( $payment_currency, $zeroCents ) ) {
237
+ //this is zero-cents currency, amount shouldn't be devided by 100
238
+ $payment_amount = $price_in_cents;
239
+ } else {
240
+ $payment_amount = $price_in_cents / 100;
241
+ }
242
+ $interval_count = $plan_data['interval_count'];
243
+ $interval = $plan_data['interval'];
244
+ $trial = $plan_data['trial_period_days'];
245
+ $plan_name = $plan_data['name'];
246
+ $description = $payment_amount . ' ' . $payment_currency;
247
+ if ( $interval_count == 1 ) {
248
+ $description .= ' / ' . $interval;
249
+ } else {
250
+ $description .= ' every ' . $plan_data['interval_count'] . ' ' . $plan_data['interval'] . 's';
251
+ }
252
+ // this should add info on trial period if available, but Stripe strips too long strings, so we leave it commented out for now.
253
+ // if ($trial != NULL) {
254
+ // $description .= '. '.$trial . ' days FREE trial.';
255
+ // }
256
+ //Billing address
257
+ $billing_address = isset( $args['billing_address'] ) ? '1' : '';
258
+ //By default don't show the billing address in the checkout form.
259
+ //if billing_address parameter is not present in the shortcode, let's check button option
260
+ if ( $billing_address === '' ) {
261
+ $collect_address = get_post_meta( $button_id, 'stripe_collect_address', true );
262
+ if ( $collect_address === '1' ) {
263
+ //Collect Address enabled in button settings
264
+ $billing_address = 1;
265
+ }
266
+ }
267
+
268
+ /* === Stripe Buy Now Button Form === */
269
+ $output = '';
270
+ $output .= '<div class="swpm-button-wrapper swpm-stripe-buy-now-wrapper">';
271
+ $output .= "<form action='" . $notify_url . "' METHOD='POST'> ";
272
+ $output .= "<div style='display: none !important'>";
273
+ $output .= "<script src='https://checkout.stripe.com/checkout.js' class='stripe-button'
274
+ data-key='" . $api_keys['public'] . "'
275
+ data-panel-label='Sign Me Up!'
276
+ data-name='{$item_name}'";
277
+ $output .= isset( $member_email ) ? sprintf( 'data-email="%s"', $member_email ) : '';
278
+ $output .= "data-description='{$description}'";
279
+ $output .= "data-locale='auto'";
280
+ $output .= "data-label='{$button_text}'"; //Stripe doesn't currenty support button image for their standard checkout.
281
+ $output .= "data-currency='{$payment_currency}'";
282
+ if ( ! empty( $item_logo ) ) {//Show item logo/thumbnail in the stripe payment window
283
+ $output .= "data-image='{$item_logo}'";
284
+ }
285
+ if ( ! empty( $billing_address ) ) {//Show billing address in the stipe payment window
286
+ $output .= "data-billing-address='true'";
287
+ }
288
+ $output .= apply_filters( 'swpm_stripe_additional_checkout_data_parameters', '' ); //Filter to allow the addition of extra data parameters for stripe checkout.
289
+ $output .= '></script>';
290
+ $output .= '</div>';
291
+
292
+ $button_image_url = get_post_meta( $button_id, 'button_image_url', true );
293
+ if ( ! empty( $button_image_url ) ) {
294
+ $output .= '<input type="image" src="' . $button_image_url . '" class="' . $class . '" alt="' . $button_text . '" title="' . $button_text . '" />';
295
+ } else {
296
+ $output .= "<button id='{$button_id}' type='submit' class='{$class}'><span>{$button_text}</span></button>";
297
+ }
298
+
299
+ $output .= wp_nonce_field( 'stripe_payments', '_wpnonce', true, false );
300
+ $output .= '<input type="hidden" name="item_number" value="' . $button_id . '" />';
301
+ $output .= "<input type='hidden' value='{$item_name}' name='item_name' />";
302
+ $output .= "<input type='hidden' value='{$payment_amount}' name='item_price' />";
303
+ $output .= "<input type='hidden' value='{$payment_currency}' name='currency_code' />";
304
+ $output .= "<input type='hidden' value='{$custom_field_value}' name='custom' />";
305
+
306
+ //Filter to add additional payment input fields to the form.
307
+ $output .= apply_filters( 'swpm_stripe_payment_form_additional_fields', '' );
308
+
309
+ $output .= '</form>';
310
+ $output .= '</div>'; //End .swpm_button_wrapper
311
+
312
+ return $output;
313
+ }
views/payments/payment-gateway/stripe_sca_button_shortcode_view.php CHANGED
@@ -56,17 +56,7 @@ function swpm_render_stripe_sca_buy_now_button_sc_output( $button_code, $args )
56
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
57
 
58
  //API keys
59
- $stripe_test_secret_key = get_post_meta( $button_id, 'stripe_test_secret_key', true );
60
- $stripe_test_publishable_key = get_post_meta( $button_id, 'stripe_test_publishable_key', true );
61
- $stripe_live_secret_key = get_post_meta( $button_id, 'stripe_live_secret_key', true );
62
- $stripe_live_publishable_key = get_post_meta( $button_id, 'stripe_live_publishable_key', true );
63
- if ( $sandbox_enabled ) {
64
- $publishable_key = $stripe_test_publishable_key; //Use sandbox API key
65
- $secret_key = $stripe_test_secret_key;
66
- } else {
67
- $publishable_key = $stripe_live_publishable_key; //Use live API key
68
- $secret_key = $stripe_live_secret_key;
69
- }
70
 
71
  $uniqid = md5( uniqid() );
72
  $ref_id = 'swpm_' . $uniqid . '|' . $button_id;
@@ -85,14 +75,15 @@ function swpm_render_stripe_sca_buy_now_button_sc_output( $button_code, $args )
85
  ob_start();
86
  ?>
87
  <script>
88
- var stripe = Stripe('<?php echo esc_js( $publishable_key ); ?>');
89
  jQuery('#swpm-stripe-payment-form-<?php echo esc_js( $uniqid ); ?>').on('submit',function(e) {
90
  e.preventDefault();
91
  var btn = jQuery(this).find('button').attr('disabled', true);
92
  jQuery.post('<?php echo esc_js( admin_url( 'admin-ajax.php' ) ); ?>', {
93
  'action': 'swpm_stripe_sca_create_checkout_session',
94
  'swpm_button_id': <?php echo esc_js( $button_id ); ?>,
95
- 'swpm_page_url': '<?php echo esc_js( $current_url ); ?>'
 
96
  }).done(function (response) {
97
  if (!response.error) {
98
  stripe.redirectToCheckout({sessionId: response.session_id}).then(function (result) {
@@ -181,17 +172,7 @@ function swpm_render_stripe_sca_subscription_button_sc_output( $button_code, $ar
181
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
182
 
183
  //API keys
184
- $stripe_test_secret_key = get_post_meta( $button_id, 'stripe_test_secret_key', true );
185
- $stripe_test_publishable_key = get_post_meta( $button_id, 'stripe_test_publishable_key', true );
186
- $stripe_live_secret_key = get_post_meta( $button_id, 'stripe_live_secret_key', true );
187
- $stripe_live_publishable_key = get_post_meta( $button_id, 'stripe_live_publishable_key', true );
188
- if ( $sandbox_enabled ) {
189
- $publishable_key = $stripe_test_publishable_key; //Use sandbox API key
190
- $secret_key = $stripe_test_secret_key;
191
- } else {
192
- $publishable_key = $stripe_live_publishable_key; //Use live API key
193
- $secret_key = $stripe_live_secret_key;
194
- }
195
 
196
  //Billing address
197
  $billing_address = isset( $args['billing_address'] ) ? '1' : '';
@@ -215,34 +196,6 @@ function swpm_render_stripe_sca_subscription_button_sc_output( $button_code, $ar
215
 
216
  $plan_id = get_post_meta( $button_id, 'stripe_plan_id', true );
217
 
218
- SwpmMiscUtils::load_stripe_lib();
219
-
220
- try {
221
- \Stripe\Stripe::setApiKey( $secret_key );
222
-
223
- $opts = array(
224
- 'payment_method_types' => array( 'card' ),
225
- 'client_reference_id' => $ref_id,
226
- 'billing_address_collection' => $billing_address ? 'required' : 'auto',
227
- 'subscription_data' => array(
228
- 'items' => array( array( 'plan' => $plan_id ) ),
229
- ),
230
- 'success_url' => $notify_url,
231
- 'cancel_url' => $current_url,
232
- );
233
-
234
- $trial_period = get_post_meta( $button_id, 'stripe_trial_period', true );
235
- $trial_period = absint( $trial_period );
236
- if ( $trial_period ) {
237
- $opts['subscription_data']['trial_period_days'] = $trial_period;
238
- }
239
-
240
- // $session = \Stripe\Checkout\Session::create( $opts );
241
- } catch ( Exception $e ) {
242
- $err = $e->getMessage();
243
- return '<p class="swpm-red-box">' . $err . '</p>';
244
- }
245
-
246
  /* === Stripe SCA Subscription Button Form === */
247
  $output = '';
248
  $output .= '<div class="swpm-button-wrapper swpm-stripe-buy-now-wrapper">';
@@ -252,14 +205,15 @@ function swpm_render_stripe_sca_subscription_button_sc_output( $button_code, $ar
252
  ob_start();
253
  ?>
254
  <script>
255
- var stripe = Stripe('<?php echo esc_js( $publishable_key ); ?>');
256
  jQuery('#swpm-stripe-payment-form-<?php echo esc_js( $uniqid ); ?>').on('submit',function(e) {
257
  e.preventDefault();
258
  var btn = jQuery(this).find('button').attr('disabled', true);
259
  jQuery.post('<?php echo esc_js( admin_url( 'admin-ajax.php' ) ); ?>', {
260
  'action': 'swpm_stripe_sca_create_checkout_session',
261
  'swpm_button_id': <?php echo esc_js( $button_id ); ?>,
262
- 'swpm_page_url': '<?php echo esc_js( $current_url ); ?>'
 
263
  }).done(function (response) {
264
  if (!response.error) {
265
  stripe.redirectToCheckout({sessionId: response.session_id}).then(function (result) {
56
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
57
 
58
  //API keys
59
+ $api_keys = SwpmMiscUtils::get_stripe_api_keys_from_payment_button( $button_id, ! $sandbox_enabled );
 
 
 
 
 
 
 
 
 
 
60
 
61
  $uniqid = md5( uniqid() );
62
  $ref_id = 'swpm_' . $uniqid . '|' . $button_id;
75
  ob_start();
76
  ?>
77
  <script>
78
+ var stripe = Stripe('<?php echo esc_js( $api_keys['public'] ); ?>');
79
  jQuery('#swpm-stripe-payment-form-<?php echo esc_js( $uniqid ); ?>').on('submit',function(e) {
80
  e.preventDefault();
81
  var btn = jQuery(this).find('button').attr('disabled', true);
82
  jQuery.post('<?php echo esc_js( admin_url( 'admin-ajax.php' ) ); ?>', {
83
  'action': 'swpm_stripe_sca_create_checkout_session',
84
  'swpm_button_id': <?php echo esc_js( $button_id ); ?>,
85
+ 'swpm_page_url': '<?php echo esc_js( $current_url ); ?>',
86
+ 'swpm_uniqid': '<?php echo esc_js( $uniqid ); ?>'
87
  }).done(function (response) {
88
  if (!response.error) {
89
  stripe.redirectToCheckout({sessionId: response.session_id}).then(function (result) {
172
  $sandbox_enabled = $settings->get_value( 'enable-sandbox-testing' );
173
 
174
  //API keys
175
+ $api_keys = SwpmMiscUtils::get_stripe_api_keys_from_payment_button( $button_id, ! $sandbox_enabled );
 
 
 
 
 
 
 
 
 
 
176
 
177
  //Billing address
178
  $billing_address = isset( $args['billing_address'] ) ? '1' : '';
196
 
197
  $plan_id = get_post_meta( $button_id, 'stripe_plan_id', true );
198
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  /* === Stripe SCA Subscription Button Form === */
200
  $output = '';
201
  $output .= '<div class="swpm-button-wrapper swpm-stripe-buy-now-wrapper">';
205
  ob_start();
206
  ?>
207
  <script>
208
+ var stripe = Stripe('<?php echo esc_js( $api_keys['public'] ); ?>');
209
  jQuery('#swpm-stripe-payment-form-<?php echo esc_js( $uniqid ); ?>').on('submit',function(e) {
210
  e.preventDefault();
211
  var btn = jQuery(this).find('button').attr('disabled', true);
212
  jQuery.post('<?php echo esc_js( admin_url( 'admin-ajax.php' ) ); ?>', {
213
  'action': 'swpm_stripe_sca_create_checkout_session',
214
  'swpm_button_id': <?php echo esc_js( $button_id ); ?>,
215
+ 'swpm_page_url': '<?php echo esc_js( $current_url ); ?>',
216
+ 'swpm_uniqid': '<?php echo esc_js( $uniqid ); ?>'
217
  }).done(function (response) {
218
  if (!response.error) {
219
  stripe.redirectToCheckout({sessionId: response.session_id}).then(function (result) {