From 4a7207ffb4a138077360ded39d8329cfa0f8346c Mon Sep 17 00:00:00 2001 From: Ashley Redman Date: Wed, 17 Jan 2024 23:57:03 +0000 Subject: [PATCH] Update wpc2o-options-api.php --- includes/wpc2o-options-api.php | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/includes/wpc2o-options-api.php b/includes/wpc2o-options-api.php index ba4011b..9330c19 100644 --- a/includes/wpc2o-options-api.php +++ b/includes/wpc2o-options-api.php @@ -6,23 +6,23 @@ */ function wpc2o_get_api_view(): string { - $content = '

API Credentials

'; - $content .= '
'; - $content .= '
    '; - $content .= '
  1. Test mode: ' . get_option(constant('WPC2O_API_TEST_MODE')) . '
  2. '; - $content .= '
  3. Key: ' . get_option(constant('WPC2O_API_KEY')) . '
  4. '; - $content .= '
  5. Order endpoint: ' . get_option(constant('WPC2O_API_ENDPOINT')) . '
  6. '; - $content .= '
  7. Stock endpoint: ' . get_option(constant('WPC2O_API_STOCK_ENDPOINT')) . '
  8. '; - $content .= '
  9. Store manager email: ' . get_option(constant('WPC2O_API_STORE_MANAGER_EMAIL')) . '
  10. '; - $content .= '
'; - $content .= 'Update your API credentials'; - $content .= '
'; - $content .= '

Example request sent to Clothes2Order

'; - $content .= '

The below example will be useful to provide to Clothes2Order if you encounter any issues

'; - $content .= ''; - $content .= ''; - $content .= '
';
-    $json              = '
+    $content  = '

API Credentials

'; + $content .= '
'; + $content .= '
    '; + $content .= '
  1. Test mode: ' . get_option(constant('WPC2O_API_TEST_MODE')) . '
  2. '; + $content .= '
  3. Key: ' . get_option(constant('WPC2O_API_KEY')) . '
  4. '; + $content .= '
  5. Order endpoint: ' . get_option(constant('WPC2O_API_ENDPOINT')) . '
  6. '; + $content .= '
  7. Stock endpoint: ' . get_option(constant('WPC2O_API_STOCK_ENDPOINT')) . '
  8. '; + $content .= '
  9. Store manager email: ' . get_option(constant('WPC2O_API_STORE_MANAGER_EMAIL')) . '
  10. '; + $content .= '
'; + $content .= 'Update your API credentials'; + $content .= '
'; + $content .= '

Example request sent to Clothes2Order

'; + $content .= '

The below example will be useful to provide to Clothes2Order if you encounter any issues

'; + $content .= ''; + $content .= ''; + $content .= '
';
+    $json    = '
             {
                 "api_key": "' . get_option(constant('WPC2O_API_KEY')) . '",
                 "order": {
@@ -65,8 +65,8 @@ function wpc2o_get_api_view(): string
                 }
             }
         ';
-    $content          .= wpc2o_code_block($json);
-    $content          .= '
'; + $content .= wpc2o_code_block($json); + $content .= '
'; return $content; }