<?php // Display variations dropdowns on shop page for variable products add_filter( 'woocommerce_loop_add_to_cart_link', 'woo_display_variation_dropdown_on_shop_page' ); function woo_display_variation_dropdown_on_shop_page() { global $product; if( $product->is_type( 'variable' )) { $attribute_keys = array_keys(…
Thêm đoạn sau vào funtion theme remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); add_action( 'woocommerce_after_shop_loop', 'woocommerce_taxonomy_archive_description', 100 );
How to Add Quantity Plus + and Minus – Buttons on WooCommerce Product Page?
add_action( 'after_setup_theme', 'setup_woocommerce_support' ); function setup_woocommerce_support() { add_theme_support('woocommerce'); } Nguồn: https://wordpress.stackexchange.com/questions/90199/how-to-declare-woocommerce-support-in-your-theme Hoặc đoạn đầy đủ dưới: // add theme suport WooCommerce function akasa_theme_setup() { // WooCommerce in general.…
https://stackoverflow.com/questions/46353307/navigation-arrows-in-woocommerce-3-x-product-gallery-slider/46448407#46448407
Đôi khi import sản phẩm từ web cũ xang web mới sẽ bị tình trạng không hiển thị đánh giá, comment. Cách khắc phục như hình
if ( ! function_exists( ‘woocommerce_template_loop_product_title’ ) ) { /** * Show the product title in the product loop. By default this is an H2. */ function woocommerce_template_loop_product_title() {…
Xóa nút Add to cart trong WooCommerce
Thêm đoạn sau vào file functions.php define(‘ALLOW_UNFILTERED_UPLOADS’, true); Chú ý khi import xong nhớ xóa dòng này đi để website bảo mật hơn Tham khảo: https://www.hostinger.vn/huong-dan/sua-loi-wordpress-sorry-file-type-not-permitted-security-reasons/ http://phuoc.orishop.net/wordpress/plugin/woocommerce/sua-loi-khong-the-import-san-pham-bang-file-csv-tren-woocommerce/
/* ** Cắt ảnh chi tiết sản phẩm */ add_filter( 'woocommerce_get_image_size_single', function( $size ) { return array( 'width' => 500, 'height' => 500, 'crop' => 1, ); }…