Add Database table on WordPress Activation

It is a good practice to create new table for your plugin when plugin is activated. register_activation_hook is used to fire a custom function when a plugin is acttivated. So here is a simple function which will trigger when plugin is get activated. function create_user_table() { global$wpdb; $charset_collate = $wpdb->get_charset_collate(); $table = $wpdb->prefix.’users’; $sql = […]

Read More