{"id":2026,"date":"2025-06-10T20:04:39","date_gmt":"2025-06-10T12:04:39","guid":{"rendered":"https:\/\/www.zhaozhao123.cn\/wpcms\/wpdt\/2026.html"},"modified":"2025-06-10T20:04:39","modified_gmt":"2025-06-10T12:04:39","slug":"%e5%a6%82%e4%bd%95%e9%9a%90%e8%97%8fwoocommerce%e7%9a%84%e9%85%8d%e9%80%81%e6%96%b9%e5%bc%8f%ef%bc%882%e7%a7%8d%e7%ae%80%e5%8d%95%e6%96%b9%e6%b3%95%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.zhaozhao123.cn\/wpcms\/post\/2026.html","title":{"rendered":"\u5982\u4f55\u9690\u85cfWooCommerce\u7684\u914d\u9001\u65b9\u5f0f\uff082\u79cd\u7b80\u5355\u65b9\u6cd5\uff09"},"content":{"rendered":"<div class=\"wp-block-columns p-0 border is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-columns px-4 py-3 border-bottom has-background is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\" style=\"background:linear-gradient(243deg,rgb(238,238,238) 0%,rgba(58,166,242,0.15) 100%)\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\r\n<figure class=\"wp-block-image size-thumbnail is-resized is-style-rounded is-style-rounded--1\"><img decoding=\"async\" src=\"https:\/\/www.zhaozhao123.cn\/myitems\/images\/sites16\/2025\/06\/dyA-1-400x300.jpg\" alt=\"Bug&#32534;&#35793;&#29422;\" class=\"wp-image-1842\" style=\"object-fit:cover;width:30px;height:30px\"><\/figure>\r\n\r\n\r\n\r\n<p class=\"my-0\">Bug&#32534;&#35793;&#29422;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-columns px-xl-5 px-4 py-xl-4 py-3 is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<p>&#35201;&#38544;&#34255;WooCommerce&#24179;&#21488;&#19978;&#30340;&#37197;&#36865;&#26041;&#24335;&#65292;&#24744;&#21487;&#20197;&#36890;&#36807;&#20197;&#19979;&#20004;&#31181;&#31616;&#21333;&#30340;&#26041;&#27861;&#26469;&#23454;&#29616;&#65306;<\/p>\n<h3>&#26041;&#27861;&#19968;&#65306;&#36890;&#36807;&#20462;&#25913;<code>functions.php<\/code>&#25991;&#20214;<\/h3>\n<ol>\n<li>\n<p><strong>&#25171;&#24320;&#24744;&#30340;&#20027;&#39064;&#30340;<code>functions.php<\/code>&#25991;&#20214;<\/strong>&#65306;<\/p>\n<ul>\n<li>&#22312;WordPress&#21518;&#21488;&#65292;&#25214;&#21040;&#24182;&#28857;&#20987;&ldquo;&#32534;&#36753;&rdquo;&#25353;&#38062;&#12290;<\/li>\n<li>&#25214;&#21040;<code>functions.php<\/code>&#25991;&#20214;&#12290;<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>&#28155;&#21152;CSS&#26679;&#24335;&#20197;&#38544;&#34255;&#37197;&#36865;&#26041;&#24335;<\/strong>&#65306;<\/p>\n<pre><code class=\"language-php\">function hide_delivery_methods() {\n   global $woocommerce;\n   if ( is_cart() || is_checkout() ) {\n       remove_action( 'woocommerce_review_order_before_total', array($woocommerce-&gt;cart, 'checkout_cart_totals'), 10 );\n   }\n}\nadd_action('wp_head', 'hide_delivery_methods');<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>&#20445;&#23384;&#26356;&#25913;<\/strong>&#65306;<\/p>\n<ul>\n<li>&#20851;&#38381;&#25991;&#20214;&#32534;&#36753;&#22120;&#21518;&#65292;&#20445;&#23384;&#25991;&#20214;&#12290;<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>&#26041;&#27861;&#20108;&#65306;&#20351;&#29992;&#25554;&#20214;&#31649;&#29702;&#37197;&#36865;&#26041;&#24335;<\/h3>\n<p>&#22914;&#26524;&#24744;&#19981;&#29087;&#24713;PHP&#25110;&#25285;&#24515;&#33258;&#24049;&#25805;&#20316;&#19981;&#24403;&#65292;&#21487;&#20197;&#32771;&#34385;&#20351;&#29992;&#19968;&#20123;&#31532;&#19977;&#26041;&#25554;&#20214;&#26469;&#31616;&#21270;&#36825;&#20010;&#36807;&#31243;&#12290;&#20363;&#22914;&#65306;<\/p>\n<ul>\n<li><strong>Hide WooCommerce Shipping Methods Plugin<\/strong>\n<ol>\n<li>&#19979;&#36733;&#24182;&#23433;&#35013;&#35813;&#25554;&#20214;&#12290;<\/li>\n<li>&#36827;&#20837;&#25554;&#20214;&#35774;&#32622;&#30028;&#38754;&#12290;<\/li>\n<li>&#26816;&#26597;&#26159;&#21542;&#26377;&#38544;&#34255;&#37197;&#36865;&#26041;&#24335;&#30340;&#21151;&#33021;&#36873;&#39033;&#12290;<\/li>\n<li>&#23433;&#35013;&#23436;&#25104;&#21518;&#65292;&#25554;&#20214;&#20250;&#33258;&#21160;&#22312;&#21518;&#21488;&#25110;&#21069;&#31471;&#26174;&#31034;&#19968;&#20010;&#22797;&#36873;&#26694;&#65292;&#36873;&#25321;&#21246;&#36873;&#21363;&#21487;&#38544;&#34255;&#37197;&#36865;&#26041;&#24335;&#12290;<\/li>\n<\/ol><\/li>\n<\/ul>\n<h3>&#31034;&#20363;&#20195;&#30721;&#19982;&#25928;&#26524;<\/h3>\n<h4>&#26041;&#27861;&#19968;&#31034;&#20363;<\/h4>\n<p>&#20551;&#35774;&#25105;&#20204;&#27491;&#22312;&#32534;&#36753;&#19968;&#20010;&#21517;&#20026;<code>mytheme<\/code>&#30340;&#20027;&#39064;&#30340;<code>functions.php<\/code>&#25991;&#20214;&#65292;&#25105;&#20204;&#23558;&#25554;&#20837;&#22914;&#19979;&#20195;&#30721;&#65306;<\/p>\n<pre><code class=\"language-php\">function hide_delivery_methods() {\n    global $woocommerce;\n    if ( is_cart() || is_checkout() ) {\n        remove_action( 'woocommerce_review_order_before_total', array($woocommerce-&gt;cart, 'checkout_cart_totals'), 10 );\n    }\n}\nadd_action('wp_head', 'hide_delivery_methods');<\/code><\/pre>\n<p>&#20445;&#23384;&#25991;&#20214;&#21518;&#65292;&#24403;&#29992;&#25143;&#35775;&#38382;&#35746;&#21333;&#39029;&#38754;&#26102;&#65292;&#37197;&#36865;&#26041;&#24335;&#23558;&#20250;&#34987;&#38544;&#34255;&#12290;<\/p>\n<h4>&#26041;&#27861;&#20108;&#31034;&#20363;<\/h4>\n<p>&#22914;&#26524;&#36873;&#25321;&#20102;&#20351;&#29992;&#25554;&#20214;&#65292;&#36890;&#24120;&#25554;&#20214;&#20250;&#22312;&#21518;&#21488;&#35774;&#32622;&#33756;&#21333;&#20013;&#25552;&#20379;&#38544;&#34255;&#37197;&#36865;&#26041;&#24335;&#30340;&#21151;&#33021;&#12290;&#26681;&#25454;&#25554;&#20214;&#30340;&#20855;&#20307;&#25805;&#20316;&#25351;&#21335;&#65292;&#24744;&#21487;&#20197;&#25214;&#21040;&#30456;&#20851;&#30340;&#35774;&#32622;&#39033;&#26469;&#36827;&#34892;&#37197;&#32622;&#12290;<\/p>\n<hr>\n<p>&#35831;&#27880;&#24847;&#65292;&#20197;&#19978;&#20195;&#30721;&#21644;&#35828;&#26126;&#37117;&#22522;&#20110;&#20551;&#35774;&#30340;&#29615;&#22659;&#12290;&#23454;&#38469;&#24212;&#29992;&#26102;&#65292;&#35831;&#30830;&#20445;&#26816;&#26597;&#24744;&#30340;&#32593;&#31449;&#23545;&#36825;&#20123;&#25913;&#21160;&#30340;&#25903;&#25345;&#65292;&#24182;&#36981;&#24490;&#26368;&#20339;&#23454;&#36341;&#12290;&#27492;&#22806;&#65292;&#23545;&#20110;&#22797;&#26434;&#21151;&#33021;&#30340;&#22788;&#29702;&#65292;&#24314;&#35758;&#23547;&#27714;&#19987;&#19994;&#30340;&#24320;&#21457;&#20154;&#21592;&#24110;&#21161;&#12290;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div><div class=\"wp-block-columns p-0 border is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-columns px-4 py-3 border-bottom has-background is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\" style=\"background:linear-gradient(243deg,rgb(238,238,238) 0%,rgba(58,166,242,0.15) 100%)\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\r\n<figure class=\"wp-block-image size-thumbnail is-resized is-style-rounded is-style-rounded--2\"><img decoding=\"async\" src=\"https:\/\/www.zhaozhao123.cn\/myitems\/images\/sites16\/2025\/06\/zp-400x300.jpg\" alt=\"&#40657;&#26495;&#21069;&#30340;Bug&#35821;&#27861;&#35762;&#24072;\" class=\"wp-image-1849\" style=\"object-fit:cover;width:30px;height:30px\"><\/figure>\r\n\r\n\r\n\r\n<p class=\"my-0\">&#40657;&#26495;&#21069;&#30340;Bug&#35821;&#27861;&#35762;&#24072;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-columns px-xl-5 px-4 py-xl-4 py-3 is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<h3>&#27010;&#36848;<\/h3>\n<p>WooCommerce &#26159;&#19968;&#20010;&#24378;&#22823;&#30340;&#30005;&#23376;&#21830;&#21153;&#24179;&#21488;&#65292;&#25552;&#20379;&#20102;&#22810;&#31181;&#25193;&#23637;&#21644;&#25554;&#20214;&#26469;&#28385;&#36275;&#19981;&#21516;&#19994;&#21153;&#38656;&#27714;&#12290;&#20854;&#20013;&#65292;&#37197;&#36865;&#26041;&#24335;&#35774;&#32622;&#26159;&#29992;&#25143;&#36141;&#29289;&#20307;&#39564;&#30340;&#19968;&#37096;&#20998;&#65292;&#21487;&#20197;&#24110;&#21161;&#21830;&#24215;&#26356;&#22909;&#22320;&#32452;&#32455;&#21830;&#21697;&#20449;&#24687;&#24182;&#25552;&#39640;&#39038;&#23458;&#28385;&#24847;&#24230;&#12290;<\/p>\n<h3>&#38382;&#39064;&#25551;&#36848;<\/h3>\n<p>&#20551;&#35774;&#24744;&#24819;&#35201;&#38544;&#34255; WooCommerce &#20013;&#30340;&#37197;&#36865;&#26041;&#24335;&#36873;&#39033;&#65292;&#36825;&#26679;&#20570;&#30340;&#30446;&#30340;&#26159;&#20026;&#20102;&#20351;&#32593;&#31449;&#35774;&#35745;&#26356;&#31616;&#27905;&#25110;&#22240;&#20026;&#26576;&#31181;&#29305;&#23450;&#21407;&#22240;&#38656;&#35201;&#38544;&#34255;&#26576;&#20123;&#37197;&#36865;&#26041;&#24335;&#12290;&#36825;&#36890;&#24120;&#28041;&#21450;&#20462;&#25913;&#25554;&#20214;&#37197;&#32622;&#25991;&#20214;&#20197;&#31105;&#29992;&#25110;&#26356;&#25913;&#26174;&#31034;&#36825;&#20123;&#37197;&#36865;&#26041;&#24335;&#30340;&#26041;&#24335;&#12290;<\/p>\n<h3>&#35299;&#20915;&#26041;&#26696;<\/h3>\n<h4>&#26041;&#27861;1&#65306;&#36890;&#36807;&#20462;&#25913;&#25554;&#20214;&#37197;&#32622;&#25991;&#20214;<\/h4>\n<h5>&#27493;&#39588;1: &#25171;&#24320;&#24744;&#30340; WooCommerce &#25554;&#20214;&#30340;&#37197;&#32622;&#25991;&#20214;<\/h5>\n<p>&#39318;&#20808;&#65292;&#22312;&#24744;&#30340; WordPress &#20027;&#39064;&#30446;&#24405;&#19979;&#25214;&#21040; WooCommerce &#30340; <code>wp-content\/plugins\/woocommerce<\/code> &#25991;&#20214;&#22841;&#65292;&#28982;&#21518;&#25171;&#24320; WooCommerce &#30340; <code>config.php<\/code> &#25991;&#20214;&#12290;&#22914;&#26524;&#35813;&#25991;&#20214;&#19981;&#23384;&#22312;&#65292;&#21487;&#20197;&#36890;&#36807;&#21019;&#24314;&#19968;&#20010;&#26032;&#30340;&#25991;&#20214;&#26469;&#26367;&#20195;&#23427;&#12290;<\/p>\n<h5>&#27493;&#39588;2: &#20462;&#25913; <code>wc-settings.php<\/code><\/h5>\n<p>&#22312; <code>config.php<\/code> &#25991;&#20214;&#20013;&#65292;&#26597;&#25214;&#24182;&#25214;&#21040;&#19982; WooCommerce &#37197;&#32622;&#30456;&#20851;&#30340;&#20869;&#23481;&#12290;&#20197;&#19979;&#26159;&#19968;&#20010;&#31034;&#20363;&#65306;<\/p>\n<pre><code class=\"language-php\">\/\/ wc-settings.php\n\n\/\/ ...\n\n\/**\n * Disable shipping methods for the current shop.\n *\/\nfunction disable_shipping_methods() {\n    \/\/ Your code to disable specific shipping methods goes here\n}\nadd_action( 'wc_after_setup_shops', 'disable_shipping_methods' );<\/code><\/pre>\n<h5>&#27493;&#39588;3: &#36816;&#34892;&#27979;&#35797;<\/h5>\n<p>&#20445;&#23384;&#20462;&#25913;&#21518;&#30340;&#25991;&#20214;&#21518;&#65292;&#20851;&#38381; WordPress&#65292;&#28982;&#21518;&#37325;&#26032;&#21551;&#21160;&#32593;&#31449;&#12290;&#29616;&#22312;&#65292;&#20320;&#24212;&#35813;&#33021;&#22815;&#22312; WooCommerce &#31649;&#29702;&#21518;&#21488;&#30475;&#21040;&#27809;&#26377;&#26174;&#31034;&#20219;&#20309;&#37197;&#36865;&#26041;&#24335;&#30340;&#39029;&#38754;&#12290;<\/p>\n<h4>&#26041;&#27861;2&#65306;&#20351;&#29992;&#25554;&#20214;&#21151;&#33021;<\/h4>\n<h5>&#20351;&#29992; <code>WC_Shop_Cart_Wrapper<\/code><\/h5>\n<p>&#24744;&#21487;&#20197;&#32771;&#34385;&#20351;&#29992; WooCommerce &#25552;&#20379;&#30340; <code>WC_Shop_Cart_Wrapper<\/code> &#25554;&#20214;&#26469;&#23454;&#29616;&#36825;&#19968;&#30446;&#26631;&#12290;&#36825;&#20010;&#25554;&#20214;&#20801;&#35768;&#24744;&#33258;&#23450;&#20041;&#27599;&#20010;&#20135;&#21697;&#39029;&#38754;&#30340;&#22806;&#35266;&#65292;&#21253;&#25324;&#20854;&#26174;&#31034;&#30340;&#37197;&#36865;&#26041;&#24335;&#12290;&#19979;&#38754;&#26159;&#22914;&#20309;&#28155;&#21152; <code>WC_Shop_Cart_Wrapper<\/code> &#30340;&#31034;&#20363;&#65306;<\/p>\n<ol>\n<li>\n<p><strong>&#23433;&#35013;&#25554;&#20214;<\/strong>&#65306;<\/p>\n<pre><code class=\"language-bash\">wp plugin install https:\/\/downloads.wordpress.org\/plugin\/wc-shop-cart-wrapper.zip<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>&#28608;&#27963;&#25554;&#20214;<\/strong>&#65306;<\/p>\n<pre><code class=\"language-bash\">wp plugin activate wc-shop-cart-wrapper<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>&#32534;&#36753;&#20027;&#39064;&#26679;&#24335;<\/strong>&#65306;\n&#22312; <code>theme-name\/assets\/css\/shop.css<\/code> &#25110;&#32773; <code>theme-name\/wp-content\/themes\/theme-name\/assets\/css\/shop.css<\/code> &#25991;&#20214;&#20013;&#65292;&#23558; <code>wc-shop-cart-wrapper<\/code> &#26679;&#24335;&#24212;&#29992;&#20110;&#20135;&#21697;&#35270;&#22270;&#37096;&#20998;&#12290;<\/p>\n<\/li>\n<li>\n<p><strong>&#27979;&#35797;&#25928;&#26524;<\/strong>&#65306;\n&#20851;&#38381; WooCommerce &#31649;&#29702;&#21518;&#21488;&#65292;&#21047;&#26032;&#27983;&#35272;&#22120;&#39029;&#38754;&#65292;&#26816;&#26597;&#26159;&#21542;&#33021;&#30475;&#21040;&#20165;&#26174;&#31034;&#40664;&#35748;&#37197;&#36865;&#26041;&#24335;&#30340;&#39029;&#38754;&#12290;<\/p>\n<\/li>\n<\/ol>\n<h3>&#27880;&#24847;&#20107;&#39033;<\/h3>\n<ul>\n<li>&#35831;&#30830;&#20445;&#22312;&#25805;&#20316;&#21069;&#22791;&#20221;&#37325;&#35201;&#25968;&#25454;&#65292;&#20197;&#20813;&#24433;&#21709;&#29616;&#26377;&#19994;&#21153;&#12290;<\/li>\n<li>&#22914;&#26524;&#36935;&#21040;&#38382;&#39064;&#65292;&#35831;&#26597;&#38405;&#25554;&#20214;&#25991;&#26723;&#25110;&#31038;&#21306;&#35752;&#35770;&#21306;&#23547;&#27714;&#24110;&#21161;&#12290;<\/li>\n<\/ul>\n<p>&#36890;&#36807;&#20197;&#19978;&#20004;&#31181;&#26041;&#27861;&#65292;&#24744;&#24212;&#35813;&#33021;&#22815;&#26377;&#25928;&#22320;&#38544;&#34255; WooCommerce &#20013;&#30340;&#37197;&#36865;&#26041;&#24335;&#12290;&#24076;&#26395;&#36825;&#23545;&#24744;&#30340;&#19994;&#21153;&#26377;&#25152;&#24110;&#21161;&#65281;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Bug&#32534;&#35793;&#29422; &#35201;&#38544;&#34255;WooCommerce&#24179;&#21488;&#19978;&#30340;&#37197;&#36865;&#26041;&#24335;&#65292;&#24744;&#21487;&#20197;&#038;..<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[59],"tuisongtax":[],"class_list":["post-2026","post","type-post","status-publish","format-standard","hentry","category-wpdt","tag-pzjc"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/2026","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/comments?post=2026"}],"version-history":[{"count":0,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/2026\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/media?parent=2026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/categories?post=2026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tags?post=2026"},{"taxonomy":"tuisongtax","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tuisongtax?post=2026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}