Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

76
Views
Editar fragmento de JavaScript ya minimizado

Tengo que editar el fragmento minimizado a continuación para: SI un mensaje (cadena) es manejado por el fragmento que contiene la palabra API , entonces para cambiar el mensaje completo a Algo salió mal. Vuelva a intentarlo más tarde. Por favor, hágame saber cómo puedo hacer esto. ¡Gracias!

 wc_myplugin.BaseGateway.prototype.submit_error = function(t) { var e = this.get_error_message(t); e.indexOf("</ul>") < 0 && (e = '<div class="' + function() { var t = "woocommerce-MyPlugin"; return this.is_current_page("checkout") && (t += " woocommerce-MyPlugin-checkout"), t }.bind(this)() + '"><ul class="woocommerce-error"><li>' + e + "</li></ul></div>"); t = o(document.body).triggerHandler("wc_myplugin_submit_error", [e, t, this]); e = void 0 === t ? e : t, this.submit_message(e)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

var eMessage = e.contains('API') ? 'Something went wrong. Try again later' : e; en la tercera fila. Básicamente, comprueba si el mensaje de error contiene "API" (letras mayúsculas). Si es así, el mensaje de error se reemplaza, de lo contrario, sigue siendo el mismo.

 wc_myplugin.BaseGateway.prototype.submit_error = function(t) { var e = this.get_error_message(t); var eMessage = e.contains('API') ? 'Something went wrong. Try again later' : e; e.indexOf("</ul>") < 0 && (e = '<div class="' + function() { var t = "woocommerce-MyPlugin"; return this.is_current_page("checkout") && (t += " woocommerce-MyPlugin-checkout"), t }.bind(this)() + '"><ul class="woocommerce-error"><li>' + eMessage + "</li></ul></div>"); t = o(document.body).triggerHandler("wc_myplugin_submit_error", [e, t, this]); e = void 0 === t ? e : t, this.submit_message(e)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!