Skip to content

Instantly share code, notes, and snippets.

@mt8
Created September 10, 2023 02:17
Show Gist options
  • Save mt8/1b35a88842905e9885a6046f7bfa69d0 to your computer and use it in GitHub Desktop.
Save mt8/1b35a88842905e9885a6046f7bfa69d0 to your computer and use it in GitHub Desktop.
[WordPress] Welcartの注文データ・会員データをマスクするSQL

wp db query のあとに以下のSQLを実行する

UPDATE
	wp_usces_member
SET
	mem_email = CONCAT( CONCAT( 'member', ID ), '@example.com' )
,	mem_name1 = CONCAT( '会員', ID )
,	mem_name2 = 'テスト'
,	mem_name3 = ''
,	mem_name4 = ''
,	mem_zip = '000-0000'
,	mem_address1 = 'テスト市'
,	mem_address2 = '1-1-1'
,	mem_address3 = '101'
,	mem_tel = '000-0000-0000'
,	mem_fax = '000-0000-0000'
,	mem_nicename =  CONCAT( '会員', ID )
;
UPDATE
	wp_usces_order
SET
	order_email = CONCAT( CONCAT( 'order', mem_id ), '@example.com' )
,	order_name1 = CONCAT( '注文者', mem_id )
,	order_name2 = 'テスト'
,	order_name3 = ''
,	order_name4 = ''
,	order_zip = '000-0000'
,	order_address1 = 'テスト市'
,	order_address2 = '1-1-1'
,	order_address3 = '101'
,	order_tel = '000-0000-0000'
,	order_fax = '000-0000-0000'
,	order_delivery = ''
;

動作確認 Welcart バージョン 2.8.21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment