WPDM Package Create Question

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

Sumit datt
Participant

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.

#170802

Nayeem Riddhi
Moderator

Hello Sumit,

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

Function Reference

and this too,

Action Reference

I hope this may help you.

Thank you and regards

#170876

Sumit datt
Participant

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

#170887

Nayeem Riddhi
Moderator

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

#170950

Sumit datt
Participant

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.

#171035

Nayeem Riddhi
Moderator

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.