This commit is contained in:
paoloar77
2024-05-17 19:13:00 +02:00
parent 18de78ce93
commit 7cb43e1a20

View File

@@ -6056,17 +6056,20 @@ Route::get('/provapao', [TestPaoController::class, 'provapao']);
Route::get('/aggiornapreorder/{idarticolo}/{postid}', function ($idarticolo, $postid) { Route::get('/aggiornapreorder/{idarticolo}/{postid}', function ($idarticolo, $postid) {
try {
// Aggiorna Preorder
$product = Product::where('sku', $idarticolo)->first(); $product = Product::where('sku', $idarticolo)->first();
if ($product) { if ($product) {
dd($product); dd($product);
$metadata = WpPostMeta::where('post_id', postid)->get(); $metadata = WpPostMeta::where('post_id', $postid)->get();
if ($metadata) { if ($metadata) {
dd($metadata); dd($metadata);
} }
$aggiorna = false; $aggiorna = false;
if ($aggiorna) { if ($aggiorna) {
@@ -6075,4 +6078,7 @@ Route::get('/aggiornapreorder/{idarticolo}/{postid}', function ($idarticolo, $po
} else { } else {
echo "Il prodotto non esiste"; echo "Il prodotto non esiste";
} }
} catch (Exception $e) {
echo "Errore: " . $e->getMessage();
}
}); });