Skip to content

Instantly share code, notes, and snippets.

@jrick1229
Last active November 29, 2018 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrick1229/c80c7fdb68ed9cd4720b75ce3eaafa5d to your computer and use it in GitHub Desktop.
Save jrick1229/c80c7fdb68ed9cd4720b75ce3eaafa5d to your computer and use it in GitHub Desktop.
----
<?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