WPDM Package Create Question

in Download Manager Free

Viewing 6 posts - 1 through 6 (of 6 total)
Apr 1, 2022 at 11:43 am
#170665
Participant
Sumit datt
OP

Hello sir,

I’m creating wpdm package by using WPDM()->package::create via PHP. There are few values which I’m not able to enter, Can you please help me ?

1. How can I add a Link for download via ‘files’ ► array() ?
2. What value should I enter to make the file accessible to all in ‘access’ ► ” ?
3. Why ‘post_name’ not working as I want to set a custom URL.

Please help as I’ve tried a lot but nothing worked.

Apr 2, 2022 at 7:23 am
#170802
Moderator
Nayeem Riddhi
Staff

Hello Sumit,

Hope you are well. Can you please check this doc for your requirements,

https://www.wpdownloadmanager.com/doc/function-reference/

and this too,

https://www.wpdownloadmanager.com/doc/action-reference/

I hope this may help you.

Thank you and regards

Apr 4, 2022 at 12:25 pm
#170876
Participant
Sumit datt
OP

Sir, there is no function mentioned in these references about how can I attach a link while creating a package via PHP.

Apr 4, 2022 at 4:10 pm
#170887
Moderator
Nayeem Riddhi
Staff

Hello Sumit,

We have also an add-on called Download Manager REST API that will help you create packages,

Download Manager REST API

Can you please check this too, if it fulfills your requirements? and how you are trying to attach a link, in the frontend or backend section, please elaborate on this.

Thank you and regards

Apr 6, 2022 at 9:27 am
#170950
Participant
Sumit datt
OP

I’m using this to create wpdm package via PHP

WPDM()->package::create([
‘post_title’ ► ‘Download’,
‘post_name’ ► ”,
‘post_content’ ► ”,
‘post_excerpt’ ► ”,
‘post_status’ ► ‘publish’,
‘post_type’ ► ‘wpdmpro’,
‘post_author’ ► 1,
‘ping_status’ ► get_option(‘default_ping_status’),
‘post_parent’ ► 0,
‘menu_order’ ► 0,
‘to_ping’ ► ”,
‘pinged’ ► ”,
‘post_password’ ► ”,
‘guid’ ► ”,
‘post_content_filtered’ ► ”,
‘files’ ► array(),
‘fileinfo’ ► array(),
‘package_dir’ ► ”,
‘link_label’ ► __(“Download”, “download-manager”),
‘download_count’ ► 0,
‘view_count’ ► 0,
‘version’ ► ”,
‘stock’ ► 0,
‘package_size’ ► $size,
‘package_size_b’ ► 0,
‘access’ ► ”,
‘individual_file_download’ ► -1,
‘cache_zip’ ► -1,
‘template’ ► ‘page-template-doc-preview.php’,
‘page_template’ ► ‘page-template-doc-preview.php’,
‘password_lock’ ► ‘0’,
’email_lock’ ► ‘0’,
‘icon’ ► ”,
]);

I want to know how can I add link to download, File access to ‘All Visitors’ and set Custom Page URL via post_name. I’m stuck in these 3 things only.

Apr 7, 2022 at 4:30 pm
#171035
Moderator
Nayeem Riddhi
Staff

Hello Sumit,

Does the above function/code-snippet is working fine without the 3 options from your side? please let me know

Thank you and regards

Viewing 6 posts - 1 through 6 (of 6 total)

The topic "WPDM Package Create Question" is closed to new replies.