The Shopkeeper
Forum Replies Created
-
@sohanhossain I have all of my plugins set on auto-update, but this plugin is the only one that gives me an error. Every time WordPress attempts to update it, it fails and sends me an email saying this:
These plugins failed to update:
– WooCommerce Shipping & Tax (from version 1.25.16 to 1.25.17)Even when I click ‘update’ for this plugin on the Plugins page of the dashboard, it fails. So ultimately, I have to download the plugin manually and install it via FTP.
Yes, it’s enabled. Also, the permissions are 0755 for the /plugins folder as well as each plugin folder within it.
Forum: Plugins
In reply to: [WooCommerce] WooCommerce Orders page shows 404 errorFalse alarm. I cleared my cookies and it started working again.
Forum: Plugins
In reply to: [WooCommerce] Add a second dropdown or checkbox on the single product page?Thank you. “Extra Product Options (Product Addons) for WooCommerce” took care of what I needed!
Thanks for the reply!
2. just optimize them with the WebP setting off. This will not generate the WebP and thus make the plugin not replace the with <picture>. The downside is that if the image appears in other places too, it will appear as .png/.jpg there too.
Are you saying there is a way to exclude only certain images from the media folder from being optimized as WebP? If so, where do I go to do this?
Just posting the solution I found that worked.
add_filter( 'woocommerce_single_product_zoom_enabled', '__return_false' );
Some more info found here.
The hook’s undocumented parameters:
$zoom_options = array ( 'url' => false, 'callback' => false, 'target' => false, 'duration' => 120, // Transition in milli seconds (default is 120) 'on' => 'mouseover', // other options: grab, click, toggle (default is mouseover) 'touch' => true, // enables a touch fallback 'onZoomIn' => false, 'onZoomOut' => false, 'magnify' => 1, // Zoom magnification: (default is 1 | float number between 0 and 1) );
Yeah, I made an edit explaining that in case of any confusion. When I include the function, it doesn’t work. I appreciate the help you’ve given me up until now. Thanks.
- This reply was modified 5 years, 6 months ago by The Shopkeeper.
Great, thanks. Now, I just need to get rid of that zoom function. Could another function be interfering? I pasted my functions file below in case you can take a look. The function I posted in the original post isn’t included, btw.
<?php add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); function my_theme_enqueue_styles() { $parent_style = 'parent-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme. wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ), wp_get_theme()->get('Version') ); wp_enqueue_style( 'my-google-fonts', 'https://fonts.googleapis.com/css?family=Lekton', false ); } //* Redirect archive pages to the home page function redirect_to_home( $query ){ if(is_archive() ) { wp_redirect( home_url() ); exit; } } add_action( 'parse_query', 'redirect_to_home' ); //* Add CPT taxonomy terms to body class function add_taxonomy_to_single( $classes ) { if ( is_single() ) { global $post; $my_terms = get_the_terms( $post->ID, 'skill' ); if ( $my_terms && ! is_wp_error( $my_terms ) ) { foreach ($my_terms as $term) { $classes[] = $term->slug; } } } return $classes; } add_filter( 'body_class', 'add_taxonomy_to_single' ); //* Add page slug body class function add_slug_body_class( $classes ) { global $post; if ( isset( $post ) ) { $classes[] = $post->post_type . '-' . $post->post_name; } return $classes; } add_filter( 'body_class', 'add_slug_body_class' ); //* Unload Gutenberg Block Editor add_action( 'wp_print_styles', 'wps_deregister_styles', 100 ); function wps_deregister_styles() { wp_dequeue_style( 'wp-block-library' ); } //* Use Google's jQuery add_action('init', 'use_jquery_from_google'); function use_jquery_from_google () { if (is_admin()) { return; } global $wp_scripts; if (isset($wp_scripts->registered['jquery']->ver)) { $ver = $wp_scripts->registered['jquery']->ver; } else { $ver = '3.4.0'; } wp_deregister_script('jquery'); wp_register_script('jquery', "//ajax.googleapis.com/ajax/libs/jquery/$ver/jquery.min.js", false, $ver); } //* Remove Testimonials post type add_action( 'init', 'remove_testimonial_cpt', 1000 ); function remove_testimonial_cpt() { unregister_post_type( 'testimonial' ); } //* Remove WYSIWYG editor from products add_action('init', 'init_remove_support',100); function init_remove_support(){ $post_type = 'product'; remove_post_type_support( $post_type, 'editor'); } //* Change gallery thumbnail sizes add_filter( 'woocommerce_get_image_size_gallery_thumbnail', function( $size ) { return array( 'width' => 132, 'height' => 162, 'crop' => 0, ); }); //* Remove Proceed to Checkout button on Cart page remove_action( 'woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout', 20); //* Remove thumbnails from Cart page add_filter( 'woocommerce_cart_item_thumbnail', '__return_false' ); //* Remove results count and dropdown on main shop page remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 ); //* Remove additional information tab on single shop page add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 ); function woo_remove_product_tabs( $tabs ) { unset( $tabs['additional_information'] ); return $tabs; } //* Add gallery captions for shop items function gcw_insert_captions( $html, $attachment_id ) { $captions = ''; $title = get_post_field( 'post_title', $attachment_id ); if( !empty( $title ) ) { $captions .= '<h3>' . esc_html( $title ) . '</h3>'; } if( !empty( $captions ) ) { $captions = '<div class="gcw-caption">' . $captions . '</div>'; $html = preg_replace('~<\/div>$~', $captions . '</div>', $html ); } return $html; } add_filter( 'woocommerce_single_product_image_thumbnail_html', 'gcw_insert_captions', 10, 2 ); ?>
What I’m looking for is the ability to not be able to zoom when the main image is hovered over. I’d also like to be able to get rid of the zoom icon so users can’t zoom altogether. I see that the zoom icon is gone from your first image, but when you hover over said image, does it zoom in? Strangely, when I use that same code, nothing changes. The zoom icon doesn’t disappear and I am still able to hover over the image and have it zoom in.
Forum: Reviews
In reply to: [WooSwipe WooCommerce Gallery] Works as intended.It actually was a plugin issue. The culprit was Shortpixel. What it does is wrap the images in a
picture
tag if I deliver the images as webp. Is this something you can fix?I just changed the rating to a 5.
Forum: Reviews
In reply to: [WooSwipe WooCommerce Gallery] Works as intended.Hey @deanoakley I appreciate the reply. Sorry for the haste review. I will try again and change my review if it ends up working. The theme I’m using is here: https://demos.themetrust.com/ridge/ I don’t think it has a built-in gallery.
Basically, I installed WooCommerce, kept all the stock settings, and installed your plugin. The thumbnails arranged into a neat carousel which was great and clicking on the main product image zoomed the image and opened a gallery which was also great. What didn’t work was clicking each thumbnail and having the respective image show up in the main window. Also, selecting a variation from the dropdown did nothing as well. I tried deactivating the plugins but it still didn’t work, so I guess it’s a theme issue.
Unfortunately, I can’t show the actual site for client privacy reasons.
Forum: Plugins
In reply to: [WooCommerce Shipping & Tax] Exterior dimensions for custom packages?Also, it’s a custom-made box. The outer dimensions are 26x21x2″. I’m not sure how to calculate the inner dimensions.
Forum: Plugins
In reply to: [WooCommerce] Exterior and inner dimensions? Are both needed?@fernashes By ‘width,’ are you referring to the thickness of the cardboard? It’s a custom-made box for art prints and I’m not sure how I’d measure the inner dimensions. Here is how it looks. How would I calculate the inner dimensions for this? The exterior dimensions for this one is 26x21x2″.
- This reply was modified 5 years, 6 months ago by The Shopkeeper.
- This reply was modified 5 years, 6 months ago by The Shopkeeper.
Forum: Plugins
In reply to: [WooCommerce] Exterior and inner dimensions? Are both needed?@fernashes Sorry, I’m not clear on what you mean. My packaging is 12x12x6″. Is that the exterior dimensions? I assumed it was “inner” since that’s what the form defaults to but inner doesn’t really make sense since I measured the box from the outside.
@fernashes Thank you for those suggestions!