Trying to extend a class to overwrite a function PHP

62 Views Asked by At

Ok, I have the parent class from a plugin I'm trying to extend:

class OsBookingHelper {

public static function get_statuses_list(){
    return array( LATEPOINT_BOOKING_STATUS_APPROVED => __('Approved', 'latepoint'), 
                  LATEPOINT_BOOKING_STATUS_PENDING => __('Pending Approval', 'latepoint'), 
                  LATEPOINT_BOOKING_STATUS_PAYMENT_PENDING => __('Payment Pending', 'latepoint'), 
                  LATEPOINT_BOOKING_STATUS_CANCELLED => __('Cancelled', 'latepoint'));
  }

}

My code to extend follows: It's not working for some reason....

if ( ! class_exists( 'OsNuuCustomAppointmentStatusHelper' ) ) :


  class OsNuuCustomAppointmentStatusHelper extends OsBookingHelper {


    function __construct(){
      parent::__construct();
    }

    public static function get_statuses_list(){
        return array( LATEPOINT_BOOKING_STATUS_APPROVED => __('Approved', 'latepoint'), 
                      LATEPOINT_BOOKING_STATUS_PENDING => __('Pending Approval', 'latepoint'), 
                      LATEPOINT_BOOKING_STATUS_PAYMENT_PENDING => __('Payment Pending', 'latepoint'), 
                      LATEPOINT_BOOKING_STATUS_CANCELLED => __('Cancelled', 'latepoint'),
                      LATEPOINT_BOOKING_STATUS_COMPLETE => __('Complete', 'latepoint'));
      }
  


endif;

Any ideas? I'm totally at a loss with this... Oh, before I forget. There's a parent class that is instantiated in another file that calls the file containing my code using include_once

0

There are 0 best solutions below