Skip to content

Commit

Permalink
pb-1295
Browse files Browse the repository at this point in the history
  • Loading branch information
jostrowka committed Nov 18, 2024
1 parent 2a00378 commit b57223d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/cart/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function edd_get_cart_quantity() {
function edd_add_to_cart( $download_id, $options = array() ) {
$download = get_post( $download_id );

if( 'download' != $download->post_type )
if( 'download' != ($download->post_type ?? null) )
return; // Not a download product

if ( ! current_user_can( 'edit_post', $download->ID ) && $download->post_status != 'publish' ) {
Expand Down

0 comments on commit b57223d

Please sign in to comment.