type = 'legacy-document'; $this->title = __( 'Legacy Document', 'woocommerce-pdf-invoices-packing-slips' ); $this->icon = WPO_WCPDF()->plugin_url() . "/assets/images/packing-slip.png"; } public function set_props( $props, $call_parent_constructor = true ) { foreach ($props as $prop => $value) { $this->{$prop} = $value; } if ( $call_parent_constructor ) { // Call parent constructor $order = ( empty( $props['order'] ) && !empty( $this->order ) ) ? $this->order : $props['order']; parent::__construct( $order ); } } } endif; // class_exists return new Legacy_Document();