| @@ -44,8 +44,13 @@ | ||
| 44 | 44 | if ( '' === $import_id || '' === $import_source ) { |
| 45 | 45 | return false; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | + // Bulk revert passes plugin slugs from the revert table; UI passes display labels. | |
| 49 | + if ( isset( Setting_Enum::SUPPORT_IMPORT_PLUGINS[ $import_source ] ) ) { | |
| 50 | + $import_source = Setting_Enum::SUPPORT_IMPORT_PLUGINS[ $import_source ]; | |
| 51 | + } | |
| 52 | + | |
| 48 | 53 | if ( 'AAWP' === $import_source && 'aawp_list' === $post_type ) { |
| 49 | 54 | $aawp_list = $lasso_db->get_aawp_list( $import_id ); |
| 50 | 55 | $aawp_amazon_ids = $aawp_list->product_asins ?? ''; |
| 51 | 56 | $aawp_amazon_ids = '' !== $aawp_amazon_ids ? explode( ',', $aawp_amazon_ids ) : array(); |
| @@ -574,9 +579,9 @@ | ||
| 574 | 579 | 'price' => $product['attributes']['ListPrice'] ?? $product['lowest_price_n'] ?? '', |
| 575 | 580 | 'default_url' => $product['url'], |
| 576 | 581 | 'url' => $product['url'], |
| 577 | 582 | 'image' => $product['images'][4]['url'] ?? $product['images'][ count( $product['images'] ) - 1 ]['url'], |
| 578 | - 'quantity' => 200, // Manual checks won't show out of stock for now. TODO: Add BLS to out of stock checks. | |
| 583 | + 'quantity' => 200, // Deferred: BLS quantity for out-of-stock checks (product decision — see epic #496). | |
| 579 | 584 | 'is_manual' => 1, |
| 580 | 585 | ); |
| 581 | 586 | $lasso_amazon_api->update_amazon_product_in_db( $store_data ); |
| 582 | 587 | } |