微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何设置代码片段以在使用 paypal 时禁用 yith 积分奖励

如何解决如何设置代码片段以在使用 paypal 时禁用 yith 积分奖励

我正在寻找一种在使用 paypal 作为付款方式时禁用 yith 积分奖励的方法

我有代码可以禁用特定产品的 yith 积分奖励,但找不到禁用付款方式的方法

其他代码是 yith 用于排除特价商品并在兑换时禁用赚取积分的代码

我认为在使用 paypal 时混合使用这些可能会禁用赚取积分。

我真的很想得到一些帮助!

        'exclude_product_on_sale'                           => array(
            'name'      => esc_html__( 'Exclude on sale products','yith-woocommerce-points-and-rewards' ),'desc'      => esc_html__( 'If enabled,sale products will not assign points to your users','yith-type' => 'onoff','type'      => 'yith-field','id'        => 'ywpar_exclude_product_on_sale','default'   => 'no',),

if( class_exists('YITH_WC_Points_Rewards_Frontend')){
    add_filter('ywpar_get_product_point_earned','ywpar_get_product_point_earned_gift_card',10,2 );
    function ywpar_get_product_point_earned_gift_card( $points,$product ){
        if( $product->is_type('gift-card')){
            $points = 0;
        }
        return $points;
    }

    add_filter('ywpar_calculate_rewards_discount_item_price','ywpar_calculate_rewards_discount_item_price',3);
    function ywpar_calculate_rewards_discount_item_price( $price,$value,$product_id){
        $product = wc_get_product( $product_id );
        if( $product->is_type('gift-card')){
            $price = 0;
        }
        return $price;
    }
}

'disable_point_earning_while_reedeming'             => array(
            'name'      => esc_html__( 'Do not assign points to orders in which the user is redeeming points','desc'      => esc_html__( 'Enable to not assign points to orders in which the user redeems points','id'        => 'ywpar_disable_earning_while_reedeming','deps'      => array(
                'id'    => 'ywpar_enable_points_upon_sales','value' => 'yes','type'  => 'hide',

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?