• Resolved gianoliveira

    (@gianoliveira)


    Hi Tobias, I really appreciate you work. It’s really awesome!

    I have created a table, [table id=1 /], that I would like to display in the “My Downloads” tab of the WooCommerce administration panel.

    I know that I have to modify the source code of the file downloads.php (WooCommerce template) but I don’t know exactly what PHP code I have to add to show the table.

    I tried adding the shortcode [table id=1 /] but it doesn’t work.

    What would be the “translation” of the shortcode [table id=1 /] to PHP code to add it to this file?

    [table id=1 /] = ???

    Thank you very much!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    That is actually a bit difficult. Now, there is PHP code for a Shortcode:

    tablepress_print_table(
      array(
        'id' => '1',
      )
    );
    

    However, that is only loaded on the frontend part of WordPress, so that it will probably not work on your Administration panel…

    Regards,
    Tobias

    Thread Starter gianoliveira

    (@gianoliveira)

    Hi Tobias, thanks for your soon answer.

    Good news! I was able to insert the table in “My Downloads” tab of the WooCommerce administration panel.

    I think it didn’t work before because I was inserting a shortcode from the Download Manager plugin but this plugin didn’t work for me.

    I have integrated YITH WooCommerce Memberships plugin and I inserted the shortcode [membership_download_product_links] to show download links when the user has an active membership and it works with TablePress table.

    I hope this information can help other people.

    Best regrads!

    • This reply was modified 6 years, 6 months ago by gianoliveira.
    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP code versión of a shortcode in TablePress’ is closed to new replies.