feat: Enhance product saving functionality with security information and language support
- Added `security_information` parameter to `ShopProduct::save` method. - Refactored language handling in product saving to utilize `Languages::languages_list`. - Updated SEO link handling to ensure proper redirection and canonical URLs. - Improved error handling and logging during the update process in `Update` class. - Enhanced producer and product classes to include additional language data. - Updated version to 0.233 and added update logs for better tracking.
This commit is contained in:
@@ -115,4 +115,19 @@ class ShopOrder
|
||||
header( 'Location: /admin/shop_order/order_details/order_id=' . (int)\S::get( 'order_id' ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
// toggle_trustmate_send
|
||||
public static function toggle_trustmate_send()
|
||||
{
|
||||
global $mdb;
|
||||
|
||||
$order_id = (int)\S::get( 'order_id' );
|
||||
$order = $mdb -> get( 'pp_shop_orders', [ 'trustmate_send' ], [ 'id' => $order_id ] );
|
||||
|
||||
$new_value = $order['trustmate_send'] ? 0 : 1;
|
||||
$mdb -> update( 'pp_shop_orders', [ 'trustmate_send' => $new_value ], [ 'id' => $order_id ] );
|
||||
|
||||
echo json_encode( [ 'result' => true, 'trustmate_send' => $new_value ] );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user