Public Ticket #4266934

Purchase list

Closed
Comments
13 Tickets 4
JOUET started the conversation 1 year ago on August 1, 2025 at 4:49am

Hi,
I need to create a page that display all purchase list for an account and sub-account so B2B users can select one quickly on logging in

But also I have to group ot tag those purchase lists so I can make filter or step selection.

How can I achieve this ? Do you have some hooks to add fields when registring a new purchase list ? And possibility to use it on listing ?

Thank you and great job for the plugin


2,762
KingsPlugins replied 1 year ago on August 2, 2025 at 9:58pm

Hi there,

Glad to assist,

Regarding your first question, by default, the purchase list page should already show subaccount lists as well, with the owner visible in the User column. You can see an example here: https://prnt.sc/Xkwk24vwt2WP

Generally you can add the purchase lists page anywhere by using this shortcode: [b2bking_purchaselists]

For adding custom filters and tags, I think you would need to create a custom UI implementation. I can help you with some hooks you can use:

When a purchase list is created:

do_action('b2bking_purchase_list_created', $purchase_list_id, get_current_user_id());

When an existing list is updated:

do_action('b2bking_purchase_list_updated', $list_id, get_current_user_id());

Generally, purchase lists are simply WP Posts of the type 'b2bking_list'. Importantly, that means you can save metadata to them (e.g. update_post_meta($list_id, 'your_custom_meta', 1234); ). I think if you were to create a custom UI, you could handle everything through that, including saving metadata for tags and then filtering based on that.

Let me know if I can help,
Stefan

Sign In