cd /path/to/backups
mysql -u root -p --default-character-set=utf8
# Switch to database
USE database_name;
SET names 'utf8';
SET autocommit=0 ;
SOURCE backup.sql;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$order = new WC_Order( $order_id ); | |
foreach ( $order->get_items() as $item_key => $item ) { | |
$product = $order->get_product_from_item( $item ); | |
$sku = $product->get_sku(); | |