Skip Navigation

[Resolved] View based on author of a woocommerce [rouct

This support ticket is created 5 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 7 replies, has 2 voices.

Last updated by Shane 5 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#1231759

Tell us what you are trying to do?

I have created a view of a product created by a user. However, when I try and create a view based on current logged in user it doesn't work.

I have hunted around and found the code for adding post support for author on products.

add_action('init', 'function_to_add_author_woocommerce', 999 );

function function_to_add_author_woocommerce() {
add_post_type_support( 'product', 'author' );
}

This works but the view isn't picking up the author based on current author loggedin filter

#1231762

I think I will need to give someone access to the site - something really screwy is going on with Toolset views

#1231787

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Gary,

Yes please provide me with access to the site.

It seems that you have a Post Author filter on your products view.

The private fields will be enabled for your next response.

Thanks,
Shane

#1231906

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2019-04-16 at 4.51.39 PM.png

Hi Gary,

Were the views being used to provide data to the forms?

Also when I create a test product for the view here
/register-three/

It works fine see screenshot.

Perhaps i'm not understanding fully.

Thanks,
Shane

#1232010

Hi Shane,
the problem is that the register-four view shows the products and if you create child experiences, all the child posts on the view. The idea on the view (single-boat-view) is to show only the product created by the author and not the product and the child posts.

#1232388

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Gary,

I was able to see the issue now.

Is there any custom coding on this site at all that is meant to target the view ? Your view is in fact listing out post from the experiences CPT as well.

Please let me know.

Thanks,
Shane

#1232407

The only custom code is kept in the GeneratePress Extender plugin - see GP Extender plugin on the dashboard menu in the backend. Nothing obvious stands out though. I have set up a relationship between the Products and Experiences in Toolset (one to many) but I thought that sat independently of this view.

You are welcome to deactivate any plugins if that helps - I've tried that but it didn't change anything.

Gary

#1232444

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Gary,

I've found the plugin that is causing the issue.

Its the dynamic content for elementor. Once I disabled it only the correct post is showing up now.

Try on your end and let me know.

Thanks,
Shane