If you have a slow import, or if you're running into a lot of server timeouts, then you can follow these steps to optimize your import.
Follow all of the steps listed here: http://www.wpallimport.com/documentation/troubleshooting/slow-imports/.
<?php | |
if(!function_exists('wc_get_products')) { | |
return; | |
} | |
$paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1; | |
$ordering = WC()->query->get_catalog_ordering_args(); | |
$ordering['orderby'] = array_shift(explode(' ', $ordering['orderby'])); | |
$ordering['orderby'] = stristr($ordering['orderby'], 'price') ? 'meta_value_num' : $ordering['orderby']; |
If you have a slow import, or if you're running into a lot of server timeouts, then you can follow these steps to optimize your import.
Follow all of the steps listed here: http://www.wpallimport.com/documentation/troubleshooting/slow-imports/.
-- https://www.w3schools.com/sql/sql_stored_procedures.asp | |
-- https://codex.wordpress.org/Database_Description | |
-- https://github.com/woocommerce/woocommerce/wiki/Database-Description | |
CREATE PROCEDURE DeleteProduct @ProductID bigint(20) | |
AS | |
DELETE FROM wp_posts WHERE ID = @ProductID; | |
DELETE FROM wp_postmeta WHERE post_id = @ProductID; | |
DELETE c, cm |