I am working on custom plugin. I need to insert currency names and symbols in table on plugin activation. Right now my database insertion code is :
global $wpdb;
$table_name1 = $wpdb->prefix . "woo_currency";
$curr_name = array('Dollars', 'Ruble', 'Riel');
$curr_symbol = array('$', 'p.', '៛');
$insert = $wpdb->insert($table_name1,
array(
'name' => $curr_name,
'symbol' => $curr_symbol,
),array('%s', '%s'));
Everthing is working fine except this database insertion on plugin activation. Have you guys any idea. How to do it?
This code gave me error
The plugin generated 416 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.
I want to add Currencies name & symbols these all.