Import a product
-
I’m building a import tool for woocommerce.
Right now i do it like this:$id = wp_insert_post([my_post_data]); update_post_meta($id, '_sku', [the sku]); update_post_meta......
for about 10 values more.
This is of course quite slow since there’ll be a lot of SQL-statements in a total.
Is it possible to build a complete php object with metadata, category, attributes etc and then save the whole object? Maybe there’s a stored procedure or something for this that will make it faster?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Import a product’ is closed to new replies.