php 在特定订单状态之后奖励积分(在本例中为“已完成”)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 在特定订单状态之后奖励积分(在本例中为“已完成”)相关的知识,希望对你有一定的参考价值。

<?php
	/**
	 * Adjust myCRED Point Rewards
	 * Will move the points payout from when an order is "paid" to when
	 * an order is "completed".
	 * @version 1.0
	 */
	function mycred_pro_adjust_woo_rewards() {

		remove_action( 'woocommerce_payment_complete',    'mycred_woo_payout_rewards' );
		add_action( 'woocommerce_order_status_completed', 'mycred_woo_payout_rewards' ); // woocommerce_order_status_<any order status>

	}
	add_action( 'after_setup_theme', 'mycred_pro_adjust_woo_rewards', 110 );

以上是关于php 在特定订单状态之后奖励积分(在本例中为“已完成”)的主要内容,如果未能解决你的问题,请参考以下文章