Created
October 24, 2020 09:06
-
-
Save Musilda/6155182f7311e5d5e32c94a3429d1921 to your computer and use it in GitHub Desktop.
This file contains 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( 'wc_order_is_editable', 'musilda_allow_edit_order' ); | |
function musilda_allow_edit_order( $editable, $statuses, $order ){ | |
if ( 'completed' === $order->get_status() ) { | |
$editable = true; | |
} | |
return $editable; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment