ver. 0.283: Legacy class cleanup — S, Html, Email, Image, Log, Mobile_Detect → Shared namespace
- Migrate class.S → Shared\Helpers\Helpers (140+ files), remove 12 unused methods - Migrate class.Html → Shared\Html\Html - Migrate class.Email → Shared\Email\Email - Migrate class.Image → Shared\Image\ImageManipulator - Delete class.Log (unused), class.Mobile_Detect (outdated UA detection) - Remove grid library loading from admin (index.php, ajax.php) - Replace gridEdit usage in 10 admin templates with grid-edit-replacement.php - Fix grid-edit-replacement.php AJAX to send values as JSON (grid.js compat) - Remove mobile layout conditionals (m_html/m_css/m_js) from Site + LayoutsRepository - Remove \Log::save_log() calls from OrderAdminService, ShopOrder, Order Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
6
api.php
6
api.php
@@ -52,14 +52,14 @@ $mdb = new medoo( [
|
||||
|
||||
$settings = ( new \Domain\Settings\SettingsRepository( $mdb ) )->allSettings();
|
||||
|
||||
if ( \S::get( 'ekomi_csv' ) )
|
||||
if ( \Shared\Helpers\Helpers::get( 'ekomi_csv' ) )
|
||||
{
|
||||
$csv_array = [ [ 'ORDER_ID', 'MAIL', 'FIRST_NAME', 'LAST_NAME', 'PRODUCT_ID', 'PRODUCT_NAME' ] ];
|
||||
|
||||
$orders_id = $mdb -> select( 'pp_shop_order_statuses', 'order_id', [ 'AND' => [ 'status_id' => 6, 'date[~]' => date( 'Y-m-d', strtotime( '-1 day', time() ) ) ] ] );
|
||||
$orders_id = array_unique( $orders_id );
|
||||
|
||||
if ( \S::is_array_fix( $orders_id ) )
|
||||
if ( \Shared\Helpers\Helpers::is_array_fix( $orders_id ) )
|
||||
{
|
||||
foreach ( $orders_id as $order_id )
|
||||
{
|
||||
@@ -67,7 +67,7 @@ if ( \S::get( 'ekomi_csv' ) )
|
||||
if ( $order )
|
||||
{
|
||||
$products = $mdb -> select( 'pp_shop_order_products', '*', [ 'order_id' => $order['id'] ] );
|
||||
if ( \S::is_array_fix( $products ) ) foreach ( $products as $product )
|
||||
if ( \Shared\Helpers\Helpers::is_array_fix( $products ) ) foreach ( $products as $product )
|
||||
{
|
||||
$csv_array[] = [ $order['id'], $order['client_email'], $order['client_name'], $order['client_surname'], $product['product_id'], $product['name'] ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user