WooCommerce Stucked (?) – Edit dimensions

It’s supposed to be like that. 3.3 changes the way images work. Instead of setting a width and height you set a width and aspect ratio: https://woocommerce.wordpress.com/2017/12/11/wc-3-3-image-size-improvements/ So if you want square cropped images that are 300 pixels wide (for example), set the width to 300 and cropping to 1:1.

Import download attachment from woocommerce product

Here is the solution i’ve found : in wordpress-importer plugin function process_posts : // try to use _wp_attached file for upload folder placement to ensure the same location as the export site // e.g. location is 2003/05/image.jpg but the attachment post_date is 2010/09, see media_handle_upload() $postdata[‘upload_date’] = $post[‘post_date’]; if ( isset( $post[‘postmeta’] ) ) { … Read more

Slow Query with more 100 products

So you want only the “first” products having a unique product_cip? I think a direct MySQL Query may be quicker: function get_all_product_in_selected_category($atts){ // Get the category if(!(isset($atts[‘category_id’]) || !is_numeric($atts[‘category_id’])){ return 0; } $catsearched = $atts[‘category_id’]; global $wpdb; $productssql = “SELECT min($wpdb->posts.ID), meta_value FROM $wpdb->posts INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON … Read more

Replace product link with just product name on WooCommerce downloads page

Remove the product link from the product name on MY Account Downloads // Display the product name without the link add_action( ‘woocommerce_account_downloads_column_download-product’, ‘custom_account_downloads_product_column’ ); function custom_account_downloads_product_column( $download ){ // Display the product name without the link echo esc_html( $download[‘product_name’] ); }