Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: When viewing orders in admin, PHP notice is coming up #515

Closed
radykal opened this issue Jan 7, 2019 · 0 comments
Closed

Bug: When viewing orders in admin, PHP notice is coming up #515

radykal opened this issue Jan 7, 2019 · 0 comments

Comments

@radykal
Copy link

radykal commented Jan 7, 2019

Hi,

there is a PHP notice with orders that were created before using Dokan.

PHP Notice: Trying to get property 'display_name' of non-object in /wp/wp-content/plugins/dokan-master/includes/admin-functions.php on line 117

That should fix the error:
$seller = get_user_by( 'id', dokan_get_seller_id_by_order( $post->ID ) ); if( $seller ) { printf( '<a href="%s">%s</a>', esc_url( admin_url( 'edit.php?post_type=shop_order&vendor_id=' . $seller->ID ) ), esc_html( $seller->display_name ) ); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant