Skip to content

Instantly share code, notes, and snippets.

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 greenhornet79/82f2f500be8f52c844f9de480c4fd2df to your computer and use it in GitHub Desktop.
Save greenhornet79/82f2f500be8f52c844f9de480c4fd2df to your computer and use it in GitHub Desktop.
<?php
// save data to the user after the corporate subscription is created
add_action('leaky_paywall_after_corporate_subscription_user_created', 'zeen101_corporate_after_created', 10, 2);
function zeen101_corporate_after_created($user_id, $post_data)
{
if (isset($post_data['phone'])) {
update_user_meta($user_id, '_phone', sanitize_text_field($post_data['phone']));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment