Sobreescribir función de plugin de WordPress sin modificarlo (vía mu-plugins)

Fuente:
https://stackoverflow.com/questions/33147735/override-plugin-function-in-wordpress

  1. add a .php file in the folder wp-content/mu-plugins let say
wp-content/mu-plugins/custom-override.php
  1. add your function in custom-override.php :
if ( ! function_exists( 'sensei_start_course_form' ) ) {
         function sensei_start_course_form( $course_id ) {
             //your magic here
             //...
         }
    }

  1. be sure that the original plugin also has this conditional “if function doesn’t already exists…”
if ( ! function_exists( 'sensei_start_course_form' ) ) { ... 
Scroll al inicio