diff --git a/src/Controllers/AdminSettingsPage_Controller.php b/src/Controllers/AdminSettingsPage_Controller.php
index 34e6c13..e1cf3d1 100644
--- a/src/Controllers/AdminSettingsPage_Controller.php
+++ b/src/Controllers/AdminSettingsPage_Controller.php
@@ -42,7 +42,7 @@ function () use ($options) {
echo '
+ value="' . esc_attr(($options['endpoint'] ?? '')) . '">
';
},
'pluginPage',
@@ -56,7 +56,7 @@ function () use ($options) {
echo '
+ value="' . esc_attr(($options['webhook_key'] ?? '')) . '">
';
},
'pluginPage',
@@ -70,7 +70,7 @@ function () use ($options) {
echo '
+ value="' . esc_attr(($options['nonce_key'] ?? '')) . '">
';
},
'pluginPage',
diff --git a/src/Controllers/CLI/Stock_Controller.php b/src/Controllers/CLI/Stock_Controller.php
index 9ca7a40..d22d849 100644
--- a/src/Controllers/CLI/Stock_Controller.php
+++ b/src/Controllers/CLI/Stock_Controller.php
@@ -16,7 +16,6 @@ function execute()
if ($products->status === 200) {
foreach ($products->data as $val) {
- echo 'SKU: ' . $val->sku . "\n";
// Product lookup, if exists, update stock, if not skip product!
$product_data = get_posts([
'post_type' => 'product',
@@ -27,22 +26,17 @@ function execute()
]);
if (!empty($product_data)) {
- echo 'ProductID: ' . $product_data[0]->ID . "\n";
- echo 'Stock: ' . $val->totalCombined . "\n";
-
$product = new \WC_Product($product_data[0]->ID);
$product->set_manage_stock(true);
$product->save();
wc_update_product_stock($product_data[0]->ID, $val->totalCombined);
} else {
- echo "not found!\n";
+ // Not found
}
-
- echo "\n";
}
} else {
- echo 'error';
+ // Error
}
}
}