kjmagic13
Forum Replies Created
-
My apologies, I created a new topic with this exact issue.
Consider the following changes to the action_admin_init function in the plugin’s index.php file and replacing the admin_init action with admin_enqueue_scripts per Targeting a Specific Admin Page
function action_admin_init($hook) { if( 'toplevel_page_wp-ultimate-csv-importer/index' != $hook ) { return; } ... } add_action('admin_enqueue_scripts', 'action_admin_init');Consider the following changes to the action_admin_init function in the plugin’s index.php file and replacing the admin_init action with admin_enqueue_scripts per Targeting a Specific Admin Page
function action_admin_init($hook) { if( 'toplevel_page_wp-ultimate-csv-importer/index' != $hook ) { return; } ... } add_action('admin_enqueue_scripts', 'action_admin_init');That’s what it was. Thanks so much!
I’m having a similar issue. I can click on the ‘Options’ button to edit my form info, but I cannot attach any fields to the form.
I had the same issue while trying to mass import products into eShop. Around line 539 of the csv_importer.php file I, using WordPress’s is_serialized() function, edited the create_custom_fields() function to unserialize any values to be added to the post meta. In turn add_post_meta() re-serializes any arrays passed through the $meta_value (third) parameter.
function create_custom_fields($post_id, $data) { foreach ($data as $k => $v) { // anything that doesn't start with csv_ is a custom field if (!preg_match('/^csv_/', $k) && $v != '') { // if value is serialized unserialize it if( is_serialized($v) ) { $v = unserialize($v); // the unserialized array will be re-serialized with add_post_meta() } add_post_meta($post_id, $k, $v); } } }You could also set it to perform a certain task depending on a specific key.
if( $k == '_eshop_product' ) { $v = unserialize($v); // etc., etc. }Hope this helps.