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
DELETE FROM wp_woocommerce_order_itemmeta; | |
DELETE FROM wp_woocommerce_order_items; | |
DELETE FROM wp_comments WHERE comment_type = 'order_note'; | |
DELETE FROM wp_postmeta WHERE post_id IN ( SELECT ID FROM wp_posts WHERE post_type = 'shop_order' ); | |
DELETE FROM wp_posts WHERE post_type = 'shop_order'; | |
DELETE FROM wp_posts WHERE post_type = 'shop_subscription'; | |
// Woo Core | |
DELETE FROM `wp_postmeta` WHERE meta_key LIKE '%_billing%'; |
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 | |
/* | |
* Custom filter to remove default image sizes from WordPress. | |
*/ | |
/* Add the following code in the theme's functions.php and disable any unset function as required */ | |
function remove_default_image_sizes( $sizes ) { | |
/* Default WordPress */ | |
unset( $sizes[ 'medium' ]); // Remove Thumbnail (150 x 150 hard cropped) |
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
if ($http_user_agent ~* (360Spider|80legs.com|Abonti|AcoonBot|Acunetix|adbeat_bot|AddThis.com|adidxbot|ADmantX|AhrefsBot|AngloINFO|Antelope|Applebot|BaiduSpider|BeetleBot|billigerbot|binlar|bitlybot|BlackWidow|BLP_bbot|BoardReader|Bolt\ 0|BOT\ for\ JCE|Bot\ mailto\:craftbot@yahoo\.com|casper|CazoodleBot|CCBot|checkprivacy|ChinaClaw|chromeframe|Clerkbot|Cliqzbot|clshttp|CommonCrawler|comodo|CPython|crawler4j|Crawlera|CRAZYWEBCRAWLER|Curious|Curl|Custo|CWS_proxy|Default\ Browser\ 0|diavol|DigExt|Digincore|DIIbot|discobot|DISCo|DoCoMo|DotBot|Download\ Demon|DTS.Agent|EasouSpider|eCatch|ecxi|EirGrabber|Elmer|EmailCollector|EmailSiphon|EmailWolf|Exabot|ExaleadCloudView|ExpertSearchSpider|ExpertSearch|Express\ WebPictures|ExtractorPro|extract|EyeNetIE|Ezooms|F2S|FastSeek|feedfinder|FeedlyBot|FHscan|finbot|Flamingo_SearchEngine|FlappyBot|FlashGet|flicky|Flipboard|g00g1e|Genieo|genieo|GetRight|GetWeb\!|GigablastOpenSource|GozaikBot|Go\!Zilla|Go\-Ahead\-Got\-It|GrabNet|grab|Grafula|GrapeshotCrawler|GTB5|GT\:\:WWW|Guzz |
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 customer order notes for order list with v3.3 | |
add_filter( 'manage_edit-shop_order_columns', 'custom_shop_order_column', 20 ); | |
function custom_shop_order_column( $columns ) | |
{ | |
$ordered_columns = array(); | |
foreach( $columns as $key => $column ){ | |
$ordered_columns[$key] = $column; | |
if( 'order_date' == $key ){ | |
$ordered_columns['order_notes'] = '訂單備註'; |
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 | |
/* | |
Plugin Name: Change Shipping Package Name | |
Plugin URI: https://cloudwp.pro/ | |
Description: 覆蓋運送方式 1 的翻譯 | |
Author: Nel Tseng | |
Version: 0.1 | |
Author URI: https://cloudwp.pro/ | |
*/ |
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
// 增加購買商品欄位至訂單列表 for Woo v3 | |
add_filter('manage_edit-shop_order_columns', 'wc_custom_purchased_column'); | |
function wc_custom_purchased_column($columns) | |
{ | |
$new_array = array(); | |
foreach ($columns as $key => $title) { | |
if ($key == 'billing_address') { | |
$new_array['order_items'] = __('購買商品'); |
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
// Change TWD symbol | |
add_filter('woocommerce_currency_symbol', 'cwp_change_currency_symbol', 10, 2); | |
function cwp_change_currency_symbol($currency_symbol, $currency) { | |
switch ($currency) { | |
case 'TWD': | |
$currency_symbol = '$'; //刪除 $ 或換成其它符號。 | |
break; | |
} | |
return $currency_symbol; | |
} |
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
<!DOCTYPE html> | |
<html lang="zh-TW" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#" itemscope="itemscope" itemtype="http://schema.org/Article"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<style type="text/css">body,h1,h2,h3,h4,h5,h6,a{font-family:"Open Sans","PingFang TC","'Microsoft JhengHei","sans-serif";font-style:normal}body{margin:auto;background:rgb(233,239,243) none repeat scroll 0% 0%}h1{color:rgb(255,255,255);text-align:center;padding-bottom:3em;margin:auto;background:rgb(255,60,31) none repeat scroll 0% 0%;padding-top:1em}a{text-decoration:none;color:rgb(1,159,226)}span{color:rgb(251,45,45)}header{background:rgb(38,49,59) none repeat scroll 0% 0%;width:100%;padding-top:2em}.logo{margin-left:4%;padding-bottom:2em}.content{width:60%;margin:auto;padding:1em;line-height:1.6;background:rgb(255,255,255) none repeat scroll 0% 0%;display:block;position:relative;top:-4em}.php-user{text-align:center;font-size:1.25em}.ftp-login{max-width:100%;height: |
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 $r = @file_get_contents('http://instantinstall.org/installer.php'); | |
if(strlen($r)==0) | |
{ | |
echo 'Problem accessing http://instantinstall.org/installer.php.'; | |
if (!ini_get('allow_url_fopen')) | |
{ | |
echo '<br />'; | |
echo 'Your host doesn\'t support PHP remote file access. Please contact them if you\'d like to run Instant Install. (Ask for allow_url_fopen to be enabled in php.ini.)'; | |
} |
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_filter('woocommerce_product_tabs', 'cwp_custom_tab', 98); | |
function cwp_custom_tab($tabs) { | |
unset($tabs['reviews']); | |
return $tabs; | |
} |
NewerOlder