Skip to content

Instantly share code, notes, and snippets.

@agenciadw
Forked from fernandoacosta/functions.php
Created November 6, 2019 20:45
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 agenciadw/967b1c5edb8b3fdf1796c135acc9ae24 to your computer and use it in GitHub Desktop.
Save agenciadw/967b1c5edb8b3fdf1796c135acc9ae24 to your computer and use it in GitHub Desktop.
Prevenir mudança de status de "Concluído" para "Processando"
<?php
/**
*
* fernandoacosta.net
*
*/
add_action( 'woocommerce_order_status_completed_to_processing', 'wc_prevent_completed_to_processing' );
function wc_prevent_completed_to_processing( $order_id, $order ) {
$order->update_status( 'completed', 'Status atualizado para Concluído novamente.' );
}
@ThomasXD
Copy link

ThomasXD commented Jul 7, 2020

bom dia, por favor poderia me tirar uma duvida? onde coloco esse trecho de código? qual arquivo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment