Skip to content

Instantly share code, notes, and snippets.

@funkysoul
Created January 24, 2017 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save funkysoul/0272864621d1ae8fc25aaeed6b85f8ad to your computer and use it in GitHub Desktop.
Save funkysoul/0272864621d1ae8fc25aaeed6b85f8ad to your computer and use it in GitHub Desktop.
WooCommerce copy fields from wp_usermeta table to xyz
UPDATE wp_usermeta AS target
LEFT JOIN wp_usermeta AS source ON source.user_id = source.user_id AND source.meta_key = 'billing_last_name'
SET target.meta_value = source.meta_value
WHERE target.user_id = source.user_id AND target.meta_key = 'last_name'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment