Category : WooCommerce

Here’s a javascript you can use to automatically complete WooCommerc orders from any status. This example uses the ‘processing’ status. add_action(‘woocommerce_order_status_changed’, ‘ts_auto_complete_virtual’); function ts_auto_complete_virtual($order_id) { if ( ! $order_id ) { return; } global $product; $order = wc_get_order( $order_id ); if ($order->data[‘status’] == ‘processing’) { $virtual_order = null; if ( count( $order->get_items() ) > 0 ..

Read more

Add the following code to your child themes functions.php file: // DISABLE WOOCOMMERCE LIGHTBOX function remove_image_zoom_support() { remove_theme_support( ‘wc-product-gallery-zoom’ ); remove_theme_support( ‘wc-product-gallery-lightbox’ ); } add_action( ‘wp’, ‘remove_image_zoom_support’, 100 ); reference: https://generatepress.com/forums/topic/disable-lightbox-image-zoom-wo..

Read more

If you have post tags and you want to use them for your WooCommerce products also, the following will definitely help you out.  It works great, but the only caveat is when you click on the tag itself, it will only show posts related to the tag. If you know how to show both post ..

Read more

In your child themes function.php file, add the following code. /** * Add the product’s short description (excerpt) to the WooCommerce shop/category pages. The description displays after the product’s name, but before the product’s price. * * Ref: https://gist.github.com/om4james/9883140 * * Put this snippet into a child theme’s functions.php file */ function woocommerce_after_shop_loop_item_title_short_description() { global ..

Read more

Sometimes you may not want to have the zoom hoving effect. Here’s some code you can put in your child theme functions.php file If you don’t know how to do or need assistance, feel free to contact us. Add following code in your child theme functions.php file: function remove_image_zoom_support() { remove_theme_support( ‘wc-product-gallery-zoom’ ); } add_action( ..

Read more