php - 如何从感谢页面中删除帐单地址?
问题描述
所以我想从感谢页面中删除帐单地址。我正在使用 wordpress,主题为 Impreza。
我的目标是 .woocommerce-customer-details 并设置为 display: none; 它在谷歌检查器模式下工作,但保存并刷新,它仍然显示。我检查了 woo-commerce 模板文件,发现 order-details-customer.php 正在生成信息。我添加了一个类来删除该部分,但它仍然显示出来。
解决方案
在主题中找到一个名为 woocommerce 的文件夹,如果不存在则创建文件夹:
复制这个文件
/wp-content/plugins/woocommerce/templates/checkout/thankyou.php
并将其粘贴到您的活动主题目录中,如下所示
/wp-content/themes/activetheme/woocommerce/checkout/thankyou.php
并删除这个
<ul class="woocommerce-thankyou-order-details order_details">
<li class="order">
<?php _e( 'Order Number:', 'woocommerce' ); ?>
<strong><?php echo $order->get_order_number(); ?></strong>
</li>
<li class="date">
<?php _e( 'Date:', 'woocommerce' ); ?>
<strong><?php echo date_i18n( get_option( 'date_format' ), strtotime( $order->order_date ) ); ?></strong>
</li>
<li class="total">
<?php _e( 'Total:', 'woocommerce' ); ?>
<strong><?php echo $order->get_formatted_order_total(); ?></strong>
</li>
<?php if ( $order->payment_method_title ) : ?>
<li class="method">
<?php _e( 'Payment Method:', 'woocommerce' ); ?>
<strong><?php echo $order->payment_method_title; ?></strong>
</li>
<?php endif; ?>
</ul>
<div class="clear"></div>
并删除它
<?php do_action( 'woocommerce_thankyou_' . $order->payment_method, $order->id ); ?>
<?php do_action( 'woocommerce_thankyou', $order->id ); ?>
推荐阅读
- django - 在 Elastic Beanstalk 上启动 SQS celery worker
- c# - 如何禁用打开 WPF 弹出窗口
- amazon-web-services - Amazon lex 匹配完全不相似的 Intent
- r - 是否可以将神经网络从 R 导出到 Excel?
- anaconda - 在 Conda 环境中导入系统模块
- mysql - 如何在多个表中计数?
- spring-boot - 在 Spring Boot 应用程序的应用程序属性中隐藏密码
- angular - Font Awesome 5 和 Angular 5
- java - 如何在android studio中正确安装jdbc驱动?
- android - 从通知启动时在现有后台堆栈顶部添加活动