0

好的,我有一个我正在尝试扩展的插件的父类:

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'));
  }

}

我要扩展的代码如下:由于某种原因它不起作用....

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;

有任何想法吗?我对此完全不知所措......哦,在我忘记之前。有一个父类在另一个文件中实例化,该文件使用 include_once 调用包含我的代码的文件

4

0 回答 0