Changeset 2723212
- Timestamp:
- 05/13/2022 08:25:48 AM (4 years ago)
- Location:
- kinguin/trunk
- Files:
-
- 5 edited
-
README.txt (modified) (2 diffs)
-
kinguin.php (modified) (2 diffs)
-
src/Plugin/Admin/SettingsPage.php (modified) (2 diffs)
-
src/Plugin/Common/OrderWebHook.php (modified) (1 diff)
-
src/Plugin/Common/ProductWebHook.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kinguin/trunk/README.txt
r2720754 r2723212 5 5 Requires at least: 5.0 6 6 Tested up to: 6.0 7 Stable tag: 1.0. 27 Stable tag: 1.0.3 8 8 Requires PHP: 7.0 9 9 License: GPLv2 … … 53 53 == Changelog == 54 54 55 = 1.0.3 = 56 * Fixed incorrect response code for webhooks. 57 * Changed order of setting fields to match order in API client area. 58 55 59 = 1.0.2 = 56 60 * Added the necessary stylesheets and scripts. -
kinguin/trunk/kinguin.php
r2720754 r2723212 4 4 Description: Import over 70,000 digital products to your online store, including video games, software, gift cards and in-game content. 5 5 Product: Kinguin 6 Version: 1.0. 26 Version: 1.0.3 7 7 Author: iLabs.dev 8 8 Author URI: https://ilabs.dev/ … … 34 34 35 35 /* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */ 36 $plugin_version = '1.0. 2';36 $plugin_version = '1.0.3'; 37 37 38 38 $plugin_name = 'Kinguin'; -
kinguin/trunk/src/Plugin/Admin/SettingsPage.php
r2712632 r2723212 107 107 ); 108 108 109 register_setting( 'kinguin_settings', 'kinguin_products_webhook_secret' ); 110 111 add_settings_field( 112 'kinguin_products_webhook_secret', 113 __( 'Products Webhook', 'kinguin' ), 114 function() { 115 ?> 116 <div style="margin-bottom: 5px;"> 117 <input id="kinguin_products_webhook_url" class="regular-text" type="text" value="<?php echo esc_attr( get_rest_url( null, '/kinguin/v1/products/update' ) ) ?>" readonly> 118 </div> 119 <label for="kinguin_products_webhook_url"> 120 <?php esc_html_e( 'Webhook Url', 'kinguin' ); ?> 121 </label> 122 <p class="description" style="margin-bottom: 15px;"> 123 <?php esc_html_e( 'Copy Webhook Url into Product Update webhook url field within your Kinguin store configuration.', 'kinguin' ); ?> 124 </p> 125 <div style="margin-bottom: 5px;"> 126 <input class="regular-text" id="kinguin_products_webhook_secret" name="kinguin_products_webhook_secret" type="text" value="<?php echo esc_attr( $this->get_products_webhook_secret() ); ?>"> 127 </div> 128 <label for="kinguin_products_webhook_secret"> 129 <?php esc_html_e( 'Secret', 'kinguin' ); ?> 130 </label> 131 <p class="description"> 132 <?php esc_html_e( 'Copy Webhook Secret into Product Update secret field within your Kinguin store configuration.', 'kinguin' ); ?> 133 </p> 134 <?php 135 }, 136 'kinguin_settings', 137 'kinguin_settings' 138 ); 139 109 140 register_setting( 'kinguin_settings', 'kinguin_orders_webhook_secret' ); 110 141 … … 138 169 ); 139 170 140 register_setting( 'kinguin_settings', 'kinguin_products_webhook_secret' );141 142 add_settings_field(143 'kinguin_products_webhook_secret',144 __( 'Products Webhook', 'kinguin' ),145 function() {146 ?>147 <div style="margin-bottom: 5px;">148 <input id="kinguin_products_webhook_url" class="regular-text" type="text" value="<?php echo esc_attr( get_rest_url( null, '/kinguin/v1/products/update' ) ) ?>" readonly>149 </div>150 <label for="kinguin_products_webhook_url">151 <?php esc_html_e( 'Webhook Url', 'kinguin' ); ?>152 </label>153 <p class="description" style="margin-bottom: 15px;">154 <?php esc_html_e( 'Copy Webhook Url into Product Update webhook url field within your Kinguin store configuration.', 'kinguin' ); ?>155 </p>156 <div style="margin-bottom: 5px;">157 <input class="regular-text" id="kinguin_products_webhook_secret" name="kinguin_products_webhook_secret" type="text" value="<?php echo esc_attr( $this->get_products_webhook_secret() ); ?>">158 </div>159 <label for="kinguin_products_webhook_secret">160 <?php esc_html_e( 'Secret', 'kinguin' ); ?>161 </label>162 <p class="description">163 <?php esc_html_e( 'Copy Webhook Secret into Product Update secret field within your Kinguin store configuration.', 'kinguin' ); ?>164 </p>165 <?php166 },167 'kinguin_settings',168 'kinguin_settings'169 );170 171 171 172 register_setting( 'kinguin_settings', 'kinguin_email_message' ); -
kinguin/trunk/src/Plugin/Common/OrderWebHook.php
r2712632 r2723212 71 71 } 72 72 73 return new \WP_REST_Response( $response );73 return new \WP_REST_Response( $response ? $response : null, 204 ); 74 74 } 75 75 -
kinguin/trunk/src/Plugin/Common/ProductWebHook.php
r2712632 r2723212 69 69 } 70 70 71 return new \WP_REST_Response( $response );71 return new \WP_REST_Response( $response ? $response : null, 204 ); 72 72 } 73 73
Note: See TracChangeset
for help on using the changeset viewer.