wordpress - 用 mailto 链接替换 woosubscriptions 取消操作
问题描述
我使用下面隐藏了取消按钮。有没有办法用mailto替换取消操作:support@blahblah.com?
foreach ( $actions as $action_key => $action ) {
switch ( $action_key ) {
case 'change_payment_method': // Hide "Change Payment Method" button?
// case 'change_address': // Hide "Change Address" button?
// case 'switch': // Hide "Switch Subscription" button?
// case 'resubscribe': // Hide "Resubscribe" button from an expired or cancelled subscription?
// case 'pay': // Hide "Pay" button on subscriptions that are "on-hold" as they require payment?
// case 'reactivate': // Hide "Reactive" button on subscriptions that are "on-hold"?
// case 'cancel': // Hide "Cancel" button on subscriptions that are "active" or "on-hold"?
unset( $actions[ $action_key ] );
break;
default:
error_log( '-- $action = ' . print_r( $action, true ) );
break;
}
}
return $actions;
}
add_filter( 'wcs_view_subscription_actions', 'eg_remove_my_subscriptions_button', 100, 2 );```
解决方案
推荐阅读
- javascript - 如何编写javascript函数来克隆表中的行?
- javascript - 如何根据Javascript中的多个数组属性取消组合对象数组
- android - Android Studio 中的错误未解析引用
- laravel - Laravel where 和 where 或者
- django - 如何在 django 中使用 opencv 将彩色图像转换为灰度图像
- neo4j - 为全文搜索运行 2 个密码查询在 neo4j 中返回错误
- arrays - 在“工作表 B”中创建新行时重复“工作表 A”
- java - 如何在 Intellij IDEA 中找到注解的处理器类?
- linux - 在 bash 脚本中切换到 root 用户
- three.js - 如何在特定关键帧处停止动画