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 | |
/** | |
* Single Product Rating | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/rating.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
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 | |
/** | |
* Code để hiển thị danh mục bài viết dạng nút | |
*/ | |
/** | |
* Tạo shortcode [category_buttons_getdm_wat] để hiển thị danh mục dạng nút | |
*/ |
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_action('wp_footer', 'wat_product_description_expand_feature'); | |
function wat_product_description_expand_feature() { | |
// Chỉ thực thi cho trang sản phẩm đơn lẻ | |
if (!is_product()) { | |
return; | |
} | |
?> | |
<style> |
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 | |
// Gỡ bỏ action hiển thị số lượng đã bán của plugin | |
function remove_original_sold_quantity_display_review_woo_wat() { | |
// Xóa cả class và function (phải thực hiện sau khi class đã được khởi tạo) | |
global $wp_filter; | |
// Xóa hook hiển thị ở trang chi tiết sản phẩm | |
if (isset($wp_filter['woocommerce_single_product_summary'])) { | |
foreach ($wp_filter['woocommerce_single_product_summary']->callbacks as $priority => $callbacks) { | |
foreach ($callbacks as $key => $callback) { |
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
/** | |
* Tự động cập nhật giá khi tăng giảm số lượng ở trang sản phẩm Woocommerce webantam.com | |
*/ | |
function add_quantity_price_update_script_pod_wat() { | |
if (is_product()) { | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
var originalPrice_pod_wat = 0; | |
var pricePerUnit_pod_wat = 0; |
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
/* anh motobike tet */ | |
.webantam-motobike-tet{ | |
animation: motorbikeAnimation 24s infinite ease-in-out; | |
} | |
@keyframes motorbikeAnimation { | |
0% { | |
left: 0; | |
transform: scaleX(1) | |
} |
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
<!-- nut lien he --> | |
<style> | |
.arcontactus-widget.right.arcontactus-message{right:7px} | |
.arcontactus-widget.right.arcontactus-message{bottom:70px} | |
.arcontactus-widget .arcontactus-message-button | |
.pulsation{-webkit-animation-duration:2s;animation-duration:2s} | |
.arcontactus-widget.md .arcontactus-message-button,.arcontactus-widget.md.arcontactus-message{width:60px;height:60px} | |
.arcontactus-widget{opacity:0;transition:.2s opacity} |
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
/** | |
* Thêm nút xóa và tăng giảm số lượng sản phẩm trong trang thanh toán WooCommerce cho Flatsome | |
* Bổ sung thêm ảnh đại diện sản phẩm | |
*/ | |
// Thêm ảnh sản phẩm vào trước tên sản phẩm | |
function add_product_image_before_name_wat($product_name, $cart_item, $cart_item_key) { | |
if (!is_checkout()) { | |
return $product_name; | |
} |
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
// Tải điều kiện file flatsome-swatches-frontend.css | |
add_action('wp_enqueue_scripts', function() { | |
wp_dequeue_style('flatsome-swatches-frontend'); | |
wp_deregister_style('flatsome-swatches-frontend'); | |
}, 20); | |
// Thêm CSS khi cần thiết | |
add_action('wp_enqueue_scripts', function() { | |
// Kiểm tra các điều kiện để load CSS | |
if ( |
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
function add_admin_mobile_edit_button_edit_wat() { | |
// Kiểm tra user có phải là admin không | |
if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) { | |
return; | |
} | |
// Kiểm tra có phải đang ở trang single, page hoặc product không | |
if (!is_singular()) { | |
return; | |
} |
NewerOlder