Skip to content

Downloadable product files not created as attachments. #688

Description

@domlat

wpsc-admin/includes/product-functions.php line 811 uses insert_post:
$id = wp_insert_post($attachment, $file, $product_id)
but function is:
function wp_insert_post($postarr, $wp_error = false)

This should clearly be using this:
function wp_insert_attachment($object, $file = false, $parent = 0)

Applies to types wpsc-product-file and wpsc-preview-file.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions