I am not using the standard WordPress register form…. I am using Woocommerce and Woocommerce has its own registration form… Your mobile number input does not show up in the Woocommerce register form….. Also keep in mind, some people may register after purchasing a product(subscription). When purchasing the product, it asks for billing detail. One of the billing details is *Phone, so in this checkout process, your subscribe mobile number input will not be beneficial.
How can I change this code to pull in WooCommerce META_VALUES from the META_KEYS of ‘billing_phone’ and ‘billing_first_name’……..FROM the WP_usermeta table?
function column_default( $item, $column_name ) {
switch ( $column_name ) {
case 'name':
case 'mobile':
return $item[ $column_name ];
case 'group_ID':
return wps_get_group_by_id( $item[ $column_name ] );
case 'date':
return sprintf( __( '%s <span class="wpsms-time">Time: %s</span>', 'wp-sms' ), date_i18n( 'Y-m-d', strtotime( $item[ $column_name ] ) ), date_i18n( 'H:i:s', strtotime( $item[ $column_name ] ) ) );
case 'status':
return ( $item[ $column_name ] == '1' ? '<span class="dashicons dashicons-yes wpsms-color-green"></span>' : '<span class="dashicons dashicons-no-alt wpsms-color-red"></span>' );
case 'activate_key':
return '<code>' . $item[ $column_name ] . '</code>';
default:
return print_r( $item, true ); //Show the whole array for troubleshooting purposes
}
}
I have already changed the query up here:
$this->data = $wpdb->get_results( "SELECT * FROM {$table_prefix}usermeta", ARRAY_A );
I know I will have to modify SQL query some, but for now that should be fine…..
DO YOU UNDERSTAND?