Last active
November 29, 2018 17:16
-
-
Save jrick1229/c80c7fdb68ed9cd4720b75ce3eaafa5d to your computer and use it in GitHub Desktop.
----
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_payment_complete_order_status', 'wcs_aco_return_completed' ); | |
/** | |
* Return "completed" as an order status. | |
* | |
* This should be attached to the woocommerce_payment_complete_order_status hook. | |
* | |
* @since 1.1.0 | |
* | |
* @param string $status The current default status. | |
* @return string The filtered default status. | |
*/ | |
function wcs_aco_return_completed( $status ) { | |
if( wcs_order_contains_subscription($order) ) { | |
return 'completed'; | |
} | |
else { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment