Ok I found the problem:
You got a typo in the function woo_pd_is_valid_post_date,
line #841 ‘if( !empty( $post_data ) ) {‘ , should be $post_date
Another concern is the format you expect the date to be. As you know different places use different date format styles, you might consider adding it as an option into settings. As there is an option in WP settings->general “Date Format”.
Now as for post_modified field: it still puts current date there and not the import. It might be due to the fact that the product actually is being updated(modified), anyhow if its not imported from csv there is no reason to use it at all.
Ok so I got into this a bit:
1) woo_pd_prepare_product does not exist.
So I looked into “woo_pd_merge_product_addons” which needs to be followed by “woo_pd_merge_product_log_addons”. You also make comparison if new value is different from old.
So we need to load existing product values fist using “woo_pd_merge_product_data_addons”.
I think you might want to add these to that snippet/tutorial on how to add custom fields to the import. Coz I didn’t know that there are different hooks for merging.
BTW I made a simple solution so that I’ll not need to write the custom fields array on each hook function. So I made a simple function that I can call and it gives me the fields. I only need to add/edit them in one place.
One more for you: I now cannot edit my previous reply, which is after you replied. So it does seem intentional not to edit the “already read” replies. But new posts before being replied I think should have edit option.
Re the forums: I am not finding any button to edit my posts)) Maybe you should login as regular user and check it out.
–> Strangest thing: I can edit this reply, but nothing else. ??
–> Ha! The “edit” button appears only for replies that are made after your reply on the topic. This is amusing lol
โone timeโ – from what I have seen its nothing complicated there. Its just seem to not grab this option โone timeโ, so when you open the Scheduled Export template another time to do some changes, no option of โFrequencyโ is chosen. I think you missed this get_option or something. So since nothing chosen it reverts to its default which is “daily” when saved.
Oh happy to know that you have it released alredy!
Few Questions:
1) Will it install as separate plugin alongside PID?
2) Will the plugin I made for PID work with this?
3) Is this basically the same as PID but with more features or is it completely different?
Hey no pressure, this solution gets me by just fine until then))
Here is a thought: I figure since the import runs each ajax request, then its something that runs all the time and can have that currency info for ajax to pull off of it. Another approach, do you use frontpage ajax or admin ajax? Coz admin ajax might just pull the right currency and no need for any hassle at all. As for CRON – it probably runs as frontend as SED does, so there as you said it could be applied globally. I did not go in that deep into your plugin to know if its right, just thinking out loud ๐
Ok so I debugged this myself. I think you can definitely use this info.
WooCommerce Ultimate Multi Currency Suite(WUMCS) using geolocation in frontend (in our setup, which is one of the options of WUMCS). This is not applied in backend. In backend there is single base currency which is set in WC. Now somehow PID runs as frontend (I think) since “get_woocommerce_currency()” in “product-new.php” line 2097 and on, gets currency by geolocation. WCMCS uses this: “add_filter(‘woocommerce_currency’, array($this, ‘custom_currency’), 9999);”. Now the best solution would be to remove this filter while importing, but since it has “$this” its trickier and has overhead.
So here is my solution which works:
There is only one small problem with this that you can help with:
I used “woo_pd_create_product_defaults” hook, but it runs many times during import. Which hook would be better to use to set this up once in beginning of import?
Hello Michael and thanks a lot for the answer. I checked and did not find “woo_pd_is_valid_product_type” filter in your code. There is a function “woo_pd_is_valid_product_type” in include/product.php but no filter. Unless You added that filter manually into that function for the Italian guy. I hoped avoiding altering your code as much as possible..
Wow this is a great surprise: * Added: Export support for WooCommerce Ultimate Multi Currency Suite (thanks Manoj), I actually have that pending))
I see you added my BOM issue, the name is Dima, Ziv is my boss ;).
Thanks for the credit.