• I am making a plugin extension. I want to override the parent class method. I actually want to override the plugin shortcode calling function that is overridden in child class.

    Parent Class

    class A(){
        __constructor{
           add_shortcode('plugin-shortcode' , array( '$this', 'event_listing' ) );
        }
        public function event_listing() {
            // Code here
       }
    }

    Child Class

    class B extends class A () {
      __contructor() {
       }
       public function event_listing() {
        // Code here
       }
    }

    Now problem is that, i am not understanding exactly how i call this child class method on the ‘plugin-shortcode’.

    Any input will be appreciated.

  • The topic ‘Overriding shortcode calling function using OOP techniques’ is closed to new replies.