Changeset 3445579
- Timestamp:
- 01/23/2026 12:44:17 PM (2 months ago)
- Location:
- m-d-integrations-connect/trunk
- Files:
-
- 4 edited
-
class.mdi-partner-integration-wc-public.php (modified) (1 diff)
-
class.mdi-partner-integration-wc-route.php (modified) (3 diffs)
-
md-integrations-connect.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
m-d-integrations-connect/trunk/class.mdi-partner-integration-wc-public.php
r3279401 r3445579 52 52 $order = wc_get_order($order_id); 53 53 54 if (! $order) { 55 return; 56 } 57 58 // avoid sending the same order more than once (covers thankyou + payment_complete). 59 if ($order->get_meta('_mdi_api_sent') === 'yes') { 60 return; 61 } 62 54 63 $apiSettings = get_option('mdintegrations_partner_integration_wc_options'); 55 64 56 65 if (!empty($apiSettings['client_id']) && !empty($apiSettings['client_secret'])) { 57 66 $content = self::$core->post_cart_info($order_id); 67 68 // Mark as sent only when we got a structured response back. 69 if (is_array($content)) { 70 $order->update_meta_data('_mdi_api_sent', 'yes'); 71 $order->save(); 72 } 73 58 74 $vouchersData = $content['data'] ?? []; 59 75 -
m-d-integrations-connect/trunk/class.mdi-partner-integration-wc-route.php
r3345159 r3445579 9 9 /** It will be requested by the MDI when the partner grants access to the API after installing the plugin; */ 10 10 register_rest_route('mdi-partner-integration-wc/v1', '/options', array( 11 'methods' => 'PATCH',11 'methods' => WP_REST_Server::EDITABLE, // POST/PUT/PATCH 12 12 'callback' => array('MDI_Partner_Integration_WC_Route', 'patch_partner_option_auth_granted'), 13 'permission_callback' => '__return_true',13 'permission_callback' => ['MDI_Partner_Integration_WC_Route', 'validate_token'], 14 14 )); 15 15 16 16 /** It will allow to update the mdi tag from MDI side; */ 17 17 register_rest_route('mdi-partner-integration-wc/v1', '/orders/(?P<id>\d+)/tags/(?P<tag>[^/]+)', array( 18 'methods' => 'PATCH',18 'methods' => WP_REST_Server::EDITABLE, // POST/PUT/PATCH 19 19 'callback' => array('MDI_Partner_Integration_WC_Route', 'patch_mdi_order_tag'), 20 20 'permission_callback' => ['MDI_Partner_Integration_WC_Route', 'validate_token'], … … 22 22 23 23 register_rest_route('mdi-partner-integration-wc/v1', '/orders/(?P<id>\d+)/tags', array( 24 'methods' => 'GET',24 'methods' => WP_REST_Server::READABLE, // GET 25 25 'callback' => array('MDI_Partner_Integration_WC_Route', 'get_mdi_order_tags'), 26 26 'permission_callback' => ['MDI_Partner_Integration_WC_Route', 'validate_token'], … … 28 28 29 29 register_rest_route('mdi-partner-integration-wc/v1', '/customers/(?P<id>\d+)', [ 30 'methods' => 'PATCH',30 'methods' => WP_REST_Server::EDITABLE, // POST/PUT/PATCH 31 31 'callback' => ['MDI_Partner_Integration_WC_Route', 'patch_customer'], 32 32 'permission_callback' => ['MDI_Partner_Integration_WC_Route', 'validate_token'], -
m-d-integrations-connect/trunk/md-integrations-connect.php
r3345159 r3445579 4 4 * Plugin URI: https://mdintegrations.com/woocommerce-plugin 5 5 * Description: Integrates M.D.Integrations with your WooCommerce store 6 * Version: 1.0. 16 * Version: 1.0.2 7 7 * Requires at least: 6.4 8 8 * Requires PHP: 8.2 -
m-d-integrations-connect/trunk/readme.txt
r3345159 r3445579 4 4 Tested up to: 6.7 5 5 Requires PHP: 8.2 6 Stable tag: 1.0. 16 Stable tag: 1.0.2 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 29 29 == Changelog == 30 30 31 = 1.0.2 = 32 Fixed: WooCommerce authorization flow in specific environments. 33 31 34 = 1.0.1 = 32 35 Automatically releasing new versions to Wordpress repository.
Note: See TracChangeset
for help on using the changeset viewer.