Hi there team
I am facing a huge problem.
The website needs the function to give this product as a gift.
I have purchased the webtoffee woocommerce gift card plugin.
But I am having trouble getting it to work.
I spoke to their support, and they installed the wpcode and added the code below.
But with the code mentioned now two things happen. If it is inactive. Only the form appears, and if it is filled out it tells me that the template is missing.
If I activate the code I get image two, which is the gift card part, but without the form.
From what I understand something is blocking the correct operation.
Could you please help me?
CODE:
add_action('woocommerce_before_single_product', function(){
if(function_exists('is_product') && is_product() && class_exists('Wt_Gc_Gift_Card_Common'))
{
global $product;
$gc_common = Wt_Gc_Gift_Card_Common::get_instance();
if(!empty($product)
&& method_exists('Wt_Gc_Gift_Card_Common', 'is_gift_card_product')
&& method_exists('Wt_Gc_Gift_Card_Common', 'is_templates_enabled')
&& Wt_Gc_Gift_Card_Common::is_gift_card_product($product->get_id())
&& Wt_Gc_Gift_Card_Common::is_templates_enabled($product->get_id())
) {
do_action( 'woocommerce_before_single_product_summary' );
}
}
});