More preventive check for order object in tracks.
This commit is contained in:
parent
e573390356
commit
fcd4057218
|
@ -25,7 +25,7 @@ class WC_Order_Tracking {
|
|||
* @param WC_Order $order Order.
|
||||
*/
|
||||
public function track_order_viewed( $order ) {
|
||||
if ( ! $order->get_id() ) {
|
||||
if ( ! $order instanceof WC_Order || ! $order->get_id() ) {
|
||||
return;
|
||||
}
|
||||
$properties = array(
|
||||
|
|
Loading…
Reference in New Issue