diff --git a/config/database.php b/config/database.php
index d4c700eb..87b70f99 100644
--- a/config/database.php
+++ b/config/database.php
@@ -145,6 +145,7 @@ return [
'prefix_indexes' => true,
],
+ /*
'wordpress' => [
'driver' => 'mysql',
'host' => env('WORDPRESS_HOST'),
@@ -153,9 +154,9 @@ return [
'username' => env('WORDPRESS_USER'),
'password' => env('WORDPRESS_PWD'),
'charset' => 'utf8',
- 'collation' => '',
+ 'collation' => 'utf8mb4_unicode_ci',
'prefix' => '', // Prefix della tabella di WordPress
- ]
+ ]*/
],
diff --git a/routes/web.php b/routes/web.php
index 78a50a11..805c849a 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -20,8 +20,8 @@ use Carbon\Carbon;
use Illuminate\Support\Facades\Route;
use Codexshaper\WooCommerce\Facades\WooCommerce;
-use App\Models\Post;
-use App\Models\PostMeta;
+// use App\Models\Post;
+// use App\Models\PostMeta;
/*
@@ -6069,23 +6069,9 @@ Route::get('/aggiornapreorder/{idarticolo}/{postid}', function ($idarticolo, $po
if ($product) {
echo "Prodotto trovato: " . $product['name'] . "
";
- $post_meta_data = PostMeta::where('post_id', $product_id)->get();
+ $variations = Variation::all($product->id);
+ dd($variations);
- $stock_status = $post_meta_data['_stock_status'];
-
- echo "Stock Status Iniziale: " . $stock_status;
-
- $campo = '_stock_status';
- $valore = 'preorder';
-
- $rowCount = PostMeta::where('post_id', $product_id)
- ->update([$campo => $valore]);
-
- if ($rowCount > 0) {
- echo "*** Nuovo valore: " . $valore . " ***
Righe aggiornate: " . $rowCount;
- } else {
- echo "Errore: Nessuna riga aggiornata";
- }
} else {
echo "Il prodotto non esiste";
}