-
WordPress教程:WooCommerce快速翻译字段
快速翻译字段 add_filter('gettext', 'translate_text'); add_filter('ngettext', 'translate_text'); function translate_text($translated) { $translated = str_ireplace(…...- 小朱笔记
- 0
- 0
- 1.2k
-
WordPress教程:WooCommerce商店页面中删除某些产品类别
商店页面中删除某些产品类别 add_action( 'pre_get_posts', 'custom_pre_get_posts_query' ); function custom_pre_get_posts_query( $q ) { if ( ! $q->is_main_query() ) return; if ( ! $q->is_post…...- 小朱笔记
- 0
- 0
- 1.3k
-
WordPress教程:WooCommerce每页/每行向上销售产品数
每页/每行向上销售产品数 remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); add_action( 'woocommerce_after_single_product_summary', '…...- 小朱笔记
- 0
- 0
- 881
-
WordPress教程:将付款类型添加到WooCommerce管理电子邮件
将付款类型添加到WooCommerce管理电子邮件 add_action( 'woocommerce_email_after_order_table', 'add_payment_method_to_admin_new_order', 15, 2 ); function add_payment_method_to_admin_new_order( $orde…...- 小朱笔记
- 0
- 0
- 1k
-
WordPress教程:WooCommerce向管理员电子邮件添加付款方式
向管理员电子邮件添加付款方式 /** * WooCommerce Extra Feature * -------------------------- * * Add payment method to admin new order email * */ add_action( 'woocommerce_email_after_order_table', 'woo_…...- 小朱笔记
- 0
- 0
- 1k
-
WordPress教程:WooCommerce自定义添加到购物车消息
自定义添加到购物车消息 /** * Custom Add To Cart Messages * Add this to your theme functions.php file **/ add_filter( 'woocommerce_add_to_cart_message', 'custom_add_to_cart_message' ); functio…...- 小朱笔记
- 0
- 0
- 1.6k
-
WordPress教程:WooCommerce添加自定义费用到购物车
添加自定义费用到购物车 /** * WooCommerce Extra Feature * -------------------------- * * Add custom fee to cart automatically * */ function woo_add_cart_fee() { global $woocommerce; if ( is_cart() ) { $woocommerc…...- 小朱笔记
- 0
- 0
- 1.3k
-
WordPress教程:WooCommerce更改电子邮件主题行
更改电子邮件主题行 /* * Subject filters: * woocommerce_email_subject_new_order * woocommerce_email_subject_customer_procesing_order * woocommerce_email_subject_customer_completed_order * woocommerce_email_subj…...- 小朱笔记
- 0
- 0
- 1.1k
-
WordPress教程:WooCommerce创建优惠券程序
创建优惠券程序 $coupon_code = 'UNIQUECODE'; https:// Code $amount = '10'; https:// Amount $discount_type = 'fixed_cart'; https:// Type: fixed_cart, percent, fixed_product, perce…...- 小朱笔记
- 0
- 0
- 1.2k
-
WordPress教程:WooCommerce设置结账时“state”字段非必填
设置结账时“state”字段非必填 /** * WooCommerce Extra Feature * -------------------------- * * Make "state" field not required on checkout * */ add_filter( 'woocommerce_billing_fields', '…...- 小朱笔记
- 0
- 0
- 1.4k