How to access variables from one plugin in another

This is the answer to the main question. You cannot access other plugin’s variables. If they’re programmed using Object Oriented Programming pattern, then maybe you will be able to access a few public variables. But it is not the standard WordPress way.

The best way to do it is by using actions and filters.

If you want to show products that match a certain condition, I suggest you create new admin menu page, then use WPDB to do custom SQL query there.

And if you don’t know how the WooCommerce and Gravity Forms data is structured, just browse the database using phpmyadmin or something that you’re familiar with, and see the structure there.

I hope it helps.