This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'woocommerce_add_order_item_meta', 'flatsome_add_sku_order_details', 10, 3 ); | |
| function flatsome_add_sku_order_details( $item_id, $values, $cart_item_key ) { | |
| $item_sku = get_post_meta( $values[ 'product_id' ], '_sku', true ); | |
| wc_add_order_item_meta( $item_id, 'sku', $item_sku , false ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| jQuery(document).ready(function ($) { | |
| function removeLoader() { | |
| $('.product-type-external').find('.single_add_to_cart_button').removeClass('loading'); | |
| } | |
| $('.product-type-external').find('.single_add_to_cart_button').attr("target", "_blank"); | |
| $('.product-type-external').find('.single_add_to_cart_button').on("click", removeLoader); | |
| }); | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'woocommerce_loop_add_to_cart_link', 'quantity_inputs_for_woocommerce_loop_add_to_cart_link', 10, 2 ); | |
| function quantity_inputs_for_woocommerce_loop_add_to_cart_link( $html, $product ) { | |
| if ( $product && $product->is_type( 'simple' ) && $product->is_purchasable() && $product->is_in_stock() && ! $product->is_sold_individually() ) { | |
| $html = '<form action="' . esc_url( $product->add_to_cart_url() ) . '" class="cart" method="post" enctype="multipart/form-data">'; | |
| $html .= woocommerce_quantity_input( array(), $product, false ); | |
| $html .= '<button type="submit" class="button alt">' . esc_html( $product->add_to_cart_text() ) . '</button>'; | |
| $html .= '</form>'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Theme Name: Flatsome Child | |
| Description: This is a child theme for Flatsome Theme | |
| Author: UX Themes | |
| Template: flatsome | |
| Version: 3.0 | |
| */ | |
| /*************** ADD CUSTOM CSS HERE. ***************/ | |
| #map_go {width:100%!important;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .woo-variation-swatches-theme-ux-shop .variations .select2-container { | |
| display:none; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function custom_woocommerce_tag_cloud_widget() { | |
| $args = array( | |
| 'number' => 15, | |
| 'taxonomy' => 'product_tag' | |
| ); | |
| return $args; | |
| } | |
| add_filter( 'woocommerce_product_tag_cloud_widget_args', 'custom_woocommerce_tag_cloud_widget' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * Bypass logout confirmation. | |
| */ | |
| function iconic_bypass_logout_confirmation() { | |
| global $wp; | |
| if ( isset( $wp->query_vars['customer-logout'] ) ) { | |
| wp_redirect( str_replace( '&', '&', wp_logout_url( wc_get_page_permalink( 'disconnected' ) ) ) ); | |
| exit; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://www.majemedia.com/2015/01/woocommerce-how-to-show-empty-categories/ |