-
-
Save gabrielmerovingi/f435a50a76e9608b38fb to your computer and use it in GitHub Desktop.
/** | |
* Adjust myCRED Point Rewards | |
* Will move the points payout from when an order is "paid" to when | |
* an order is "completed". | |
* @version 1.0 | |
*/ | |
add_action( 'after_setup_theme', 'mycred_pro_adjust_woo_rewards', 110 ); | |
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' ); | |
} |
You can put this code in function.php of your main theme or the function.php of your chield theme the best practices is to put code in your child theme so any new updates want affect the code
could i change the status from complete to order processing
how should i modified bellow code
remove_action( 'woocommerce_payment_complete', 'mycred_woo_payout_rewards' );
add_action( 'woocommerce_order_status_completed', 'mycred_woo_payout_rewards' );
Hello, I have my site hosted in Wpengine. When I try the point rewards in the staging site (no cache) the point rewards work perfectly, but when I try it in the live site which have the robust WPengine cache system, then the points are not rewarded when purchasing a product.
I contact WPengine and they told me to ask the developer what is the name of the cookie or cookies involved in the point rewards functionality so that they can exclude them from cache and see it the points are given.
Thanks a lot for this great plugin!
This works have way.
When a set value is entered as reward point, let say, 100 point, and the customer on the time of placing an order, entered quantity higher than one, it does not multiply the value of point to be giving. But rather, rewards with just that entered value, irrespective of the quantity.
Any solution for this.
Hi, does this also work on WooCommerce Subscription?
Hallo Gabriel, where do I put this code. Please write me the way.
Thank you.