Giftcard integrations

Hi @yehen and @ihor how are you? I have a question for you. I am trying to integrate the gift card extension of WooCommerce in the site. Everything looks fine, I was able to set up the gift cards and add them in the checkout.

Normally though the extension, there is a gift card option in the dashboard that allows users to add directly gift cards and use it purchase products or services. Neverthless, this options was not added it the dashboard of the users though the hivepress theme. I am wondering if there is an option to make it available in the theme like a snippet that I can add to make it possible.

Let me know if there is a solution, this feature is very important in the site :slight_smile:
Thanks!

Hi,
I guess this extension adds the gift cards page to the WooCommerce dashboard page, not the HivePress account page - this would probably require extra integration. We’ll consider adding integration with some existing wallet or gift card extensions in future Marketplace updates.

Hi @ihor thanks!

I tested the gift card option and indeed it send me to the woocomerce dashboard that is somewhere inside my page.

I remembered I had added a page in the dashboard using the snippet below. I tried to edit it to make it work to add the page with the information about the gift card, but it did not work. Can you give it a look if there is a way to make it work?

Thanks!

add_filter(
	'hivepress/v1/menus/user_account',
	function( $menu ) {
		if(current_user_can('edit_posts')){
			$menu['items']['custom_item_add_listing'] = [
			'label'  => 'Tarjetas de regalo',
		    'url'    => hivepress()->router->get_url('myaccount_giftcards'),
		    '_order' => 100,
		];
			
		}
        return $menu;
	},
	1000
);

Please try to put a plain text URL in quotes in the URL parameter instead of hivepress()->router->get_url() function

Hi yevhen,

I am not quite sure I understood you. The issue is that I do not have a single plain URL link for that. I know that the gift card tab exists inside of website (in the woocomerce dashboard) I just want to be able to make it available in the hivepress dashboard.

Could you help me?

Please check this page URL on the WooCommerce dashboard page (it’s probably “/my-account”) - hover on this menu item or click on it and copy its URL from the browser address tab. If this URL is the same for all users like “/my-account/gift-cards” then you can add it to the HivePress menu using the code snippet above. Please note that this may require further customizations because users will see the WooCommerce account page when they click on this new page since it’s embedded into the WooCommerce account.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.