Button "Download now" does not work

Posted by: henriquelucas

10th July 2019, 10:48 pm

henriquelucas

@henriquelucas

10 Jul 2019
10:48 pm

I have a custom theme. I added the following code:

<? php add_filter ('somdn_product_page_content_woo', 'somdn_product_page_content_woo_custom'); function somdn_product_page_content_woo_custom () { // Return to different WooCommerce product page hook return 'woocommerce_simple_add_to_cart'; } ?>

in the content-single-product.php file of my template and the button is still not displayed to download the product.

  • Developer
    Richard Webster

    @rwebster

    11 Jul 2019
    6:27 am

    That's not how you use that code.

    You could try adding the shortcode to the download page, short description perhaps. It's:

    [download_now_page]
  • henriquelucas

    @henriquelucas

    11 Jul 2019
    1:13 pm

    Okay so can I add it as follows?

    <? php echo do_shortcode ("[download_now_page]"); ?>

    Last modified: 11th July 2019, 1:16 pm by henriquelucas

  • Developer
    Richard Webster

    @rwebster

    11 Jul 2019
    1:25 pm

    You can do it like that yea. Does the shortcode itself work for you?

  • henriquelucas

    @henriquelucas

    11 Jul 2019
    1:38 pm

    Yes, I was able to add short