This file contains 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
Đăng nhập SSH và chạy lệnh sau: | |
sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh) | |
Nếu bạn không vào đc SSH nhưng vẫn vào được CyberPanel thì bạn vào menu Security > Secure SSH rồi bấm Save Changes | |
Chú ý mục Permit Root Login phải là Enable | |
Sau đó bạn có thể vào lại SSH bình thường |
This file contains 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ạo element paragraph trước element size, đặt class là `float-position-element` trong mục Advanced của element. | |
Thay thế block UX id `lightbox-sizechart` bằng block chứa size-chart của bạn. | |
Nội dung element: <a href="#lightboxsizechart" target="_self" class="button secondary is-xsmall custom-sizeguide"><span>Size Guide</span></a>[lightbox width="800px" id="lightboxsizechart"][block id="lightbox-sizechart"][/lightbox] | |
Demo: https://greencity.woocodex.com/product/jesus-is-my-god-all-over-printed-shirts-221220/ | |
*/ |
This file contains 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
-- Run this SQL commands from PhpMyAdmin or similar ways | |
-- change the wp_ to your tables prefix to make it works | |
-- Script from SalesGen.io | |
DELETE FROM wp_term_taxonomy WHERE taxonomy = 'product_cat' AND count = 0; | |
DELETE t FROM wp_terms t LEFT JOIN wp_term_taxonomy tt ON tt.term_id = t.term_id WHERE tt.term_id IS NULL; |
This file contains 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
-- Run this SQL commands from PhpMyAdmin or similar ways | |
-- change the wp_ to your tables prefix to make it works | |
-- Script from SalesGen.io | |
UPDATE wp_term_taxonomy tt SET count = (SELECT COUNT(object_id) FROM wp_term_relationships WHERE term_taxonomy_id = tt.term_taxonomy_id) WHERE taxonomy = 'product_cat'; |
This file contains 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
-- SalesGen.io | |
-- Change 'category name' by your category name | |
-- Reduce current price 5 | |
update `wp_postmeta` SET meta_value = meta_value - 5 WHERE meta_key IN ('_regular_price', '_price') AND meta_value <> '' AND post_id IN (SELECT object_id from wp_term_relationships WHERE term_taxonomy_id IN(SELECT term_taxonomy_id FROM `wp_term_taxonomy` WHERE taxonomy = 'product_cat' AND term_id IN (SELECT term_id FROM `wp_terms` WHERE name = 'category name'))); | |
-- Increase current price 5 | |
update `wp_postmeta` SET meta_value = meta_value + 5 WHERE meta_key IN ('_regular_price', '_price') AND meta_value <> '' AND post_id IN (SELECT object_id from wp_term_relationships WHERE term_taxonomy_id IN(SELECT term_taxonomy_id FROM `wp_term_taxonomy` WHERE taxonomy = 'product_cat' AND term_id IN (SELECT term_id FROM `wp_terms` WHERE name = 'category name'))) |
This file contains 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
-- replace category_name by your category name | |
DELETE FROM wp_posts WHERE ID IN (SELECT object_id from wp_term_relationships WHERE term_taxonomy_id IN(SELECT term_taxonomy_id FROM `wp_term_taxonomy` WHERE taxonomy = 'product_cat' AND term_id IN (SELECT term_id FROM `wp_terms` WHERE name like '%category_name%'))) |
This file contains 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
-- Delete product variants | |
DELETE FROM wp_posts WHERE post_type = 'product_variation' AND post_parent IN (DELETE FROM wp_posts WHERE post_type = 'product' AND post_status = 'trash'); | |
-- Delete main product | |
DELETE FROM wp_posts WHERE post_type = 'product' AND post_status = 'trash'; | |
-- clean metapost | |
DELETE pm | |
FROM wp_postmeta pm |
This file contains 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 | |
// SalesGen.io | |
// WooCommerce plugins, woocommerce upsell, woocommerce buy more save more | |
/*** Follow Steps ***/ | |
// 1 Put the code below into the functions.php of your theme | |
add_filter('woocommerce_get_price_html', 'salesgen_hide_variation_price', 99, 2); | |
function salesgen_hide_variation_price( $v_price, $v_product ) { |
This file contains 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
div[id^=zoid-paypal-buttons]:nth-child(3), | |
div[id^=zoid-paypal-buttons]:nth-child(1) { | |
display: none!important; | |
} |
This file contains 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
/* | |
Anthony from SalesGen.io | |
Demo page https://greencity.woocodex.com/product/let-your-faith-be-bigger-than-your-fear-all-over-printed-shirts-2/ | |
Copy this script into your functions.php file theme | |
*/ | |
add_action('wp_footer', function(){ | |
/* Code By SalesGen.io */ | |
?> |
NewerOlder