Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

160
Vistas
Excute Javascript when order status is changed in the back-end

I am trying to execute a JavaScript file for when the order status is changed in the back-end. But it doesn't seem to work. Below is the code I am currently using. Can anybody tell me what I am doing wrong? When I try to enqueue the script in other places, it does work.

function script_on_order_complete( $order_id ) {
    wp_register_script('test', get_template_directory_uri() .'/js/test.js',false);
    wp_enqueue_script( 'test');
}
add_action( 'woocommerce_order_status_completed', 'script_on_order_complete', 10, 1 );
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda