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/.
| DELETE | |
| FROM wp_woocommerce_order_itemmeta | |
| WHERE order_item_id IN ( | |
| SELECT order_item_id | |
| FROM wp_woocommerce_order_items | |
| WHERE order_id IN ( | |
| SELECT ID | |
| FROM wp_posts | |
| WHERE post_date < '2017-01-01' | |
| ) |
| <?php | |
| /** | |
| * Attributes shortcode callback. | |
| */ | |
| function so_39394127_attributes_shortcode( $atts ) { | |
| global $product; | |
| if( ! is_object( $product ) || ! $product->has_attributes() ){ |
| <?php | |
| // Step 1. Add the filters surrounding the get_terms (which should be used in your code) | |
| add_filter( 'terms_clauses', 'rs_replace_inner_with_straight_joins', 20 ); | |
| $terms = get_terms( $args ); | |
| remove_filter( 'terms_clauses', 'rs_replace_inner_with_straight_joins', 20 ); | |
| // Step 2. Add to functions.php or similar: | |
| function rs_replace_inner_with_straight_joins( $pieces, $taxonomies = null, $args = null ) { | |
| global $wpdb; | |
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 | |
| /* | |
| Plugin Name: CI Comment Rating | |
| Description: Adds a star rating system to WordPress comments | |
| Version: 1.0.0 | |
| Author: The CSSIgniter Team | |
| Author URI: https://cssigniter.com/ | |
| */ | |
| //Enqueue the plugin's styles. |
| /* | |
| * Add our Custom Fields to simple products | |
| */ | |
| function mytheme_woo_add_custom_fields() { | |
| global $woocommerce, $post; | |
| echo '<div class="options_group">'; | |
| // Text Field |
| add_filter('woocommerce_package_rates', 'wf_remove_shipping_options_for_particular_country', 10, 2); | |
| function wf_remove_shipping_options_for_particular_country($available_shipping_methods, $package){ | |
| global $woocommerce; | |
| //Config this array with country code and corresponding shipping methods to hide. | |
| $country_list = array( | |
| 'CA' => array('wf_fedex_woocommerce_shipping','free_shipping'), | |
| ); |
| <?php | |
| /**resize on upload to the largest size in media setting */ | |
| function replace_uploaded_image($image_data) { | |
| // if there is no large image : return | |
| if (!isset($image_data['sizes']['large'])) return $image_data; | |
| // path to the uploaded image and the large image | |
| $upload_dir = wp_upload_dir(); |
| //maps.googleapis.com | |
| //maps.gstatic.com | |
| //fonts.googleapis.com | |
| //fonts.gstatic.com | |
| //ajax.googleapis.com | |
| //apis.google.com | |
| //google-analytics.com | |
| //www.google-analytics.com | |
| //ssl.google-analytics.com | |
| //youtube.com |
| <?php | |
| $currentlang = get_bloginfo('language'); | |
| if($currentlang=="en-GB"): | |
| ?> | |
| <?php elseif($currentlang=="pl-PL"): ?> | |
| <?php endif; ?> |