• Hello, I tried to load your plugin from another php file it didn’t work.

    Specifically, I want to make sure this filter run

    <?php $items = $this->get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item_id => $item ) : ?>
    <tr class="<?php echo apply_filters( 'wpo_wcpdf_item_row_class', $item_id, $this->type, $this->order, $item_id ); ?>">

    I used require to load all related classes I could find: WPO, Documents, Data, WC_Core, Order, Product, Order_Document, Order_Document_Methods, Invoice but it still didn’t work. Please help, I’m not familiar with using namespace. Thank you

Viewing 1 replies (of 1 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    You can’t use the plugin unless WordPress and WooCommerce are loaded too. And if they are, then the plugin is probably loaded as well…. (and if not, then simply calling WPO_WCPDF() should load everything). Which probably means it’s going wrong somewhere else. Could you elaborate a bit on the “I tried to load your plugin from another php file” statement?

Viewing 1 replies (of 1 total)

The topic ‘Load plugin classes from php file’ is closed to new replies.