Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ronyp

    (@ronyp)

    Hello @vendidero,

    Did you update the plugin to the latest version?
    Please upgrade and make below quick changes.

    File: includes/class-wcj-product-by-user.php
    On Line: 95 Please change “$order->id” to “wcj_get_order_id( $order )”

    BEFORE: $useremail = $this->getProductOwnerEmail( $order->id );
    AFTER: $useremail = $this->getProductOwnerEmail( wcj_get_order_id( $order ) );

    Kind Regards,
    RonyP – Support Team

    Thread Starter vendidero

    (@vendidero)

    Hi @ronyp,

    the issue still remains after updating to 5.6.0. The actual issue is that you are assuming, that every single email sent by WooCommerce has an order attached as an object. That’s not the case as plugins may register additional emails for WooCommerce which may contain other objects. You must check whether the third argument to woocommerce_email_headers is actual a WC_Order object or not in:

    public function sendemail_to_productowner_order_place_successfully( $headers, $email_id, $object ) {
       if ( is_a( $object, 'WC_Order' ) ) {
          // Do your custom checks..
       }
    
       return $headers;
    }

    Cheers

    Plugin Author ronyp

    (@ronyp)

    Hello @vendidero

    We have fixed the above and released a new version. Kindly please upgrade and let me know.

    Kind Regards,
    RonyP – Support Team

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug in class-wcj-product-by-user.php’ is closed to new replies.