I use Paid Listings.
For users I added a custom attribute like select with two parameters, for example User and Company, which they should select during account registration. In the database I know where the value of the selected parameter from select is stored. The question is, is it possible for User to disable the need to subscribe, and if the Company parameter is selected during registration, to require a subscription to a paid plan? Besides creating Free and Paid plan and for User hide it with display: none
and for Company hide Free plan in the same way, are there any other options?
I realize that there is probably no simple solution, but is it possible there is some material that could direct to a solution?
Thanks
Update: was able to resolve my issue on my own.
I created a separate product in Products (WooCommerce), created a new Packages in Listings and connected it to the WooCommerce product. After writing a code that analyzes wp_usermeta and if during registration in the field type select the required account type was selected (meta_key → hp_(user attribute field name) → ID in meta_value), then the user is automatically assigned an order with the status processing. For this particular order I also disabled the sending of a successful purchase email from woocommerce. Also with the help of custom code, because I did not find such a function for only one order.
Thanks for sharing!
Another possible option (if you mean skipping the Select Package page for regular users, those who selected User during the registration) is removing the Select Package page from the hivepress/v1/menus/listing_submit
menu. The listing process is a chained menu so if you remove an item, the page will be skipped.
Hope this helps