Skip to content

Commit

Permalink
Merge pull request #61 from upsellpl/feature/pb-1635-cast-int-product-id
Browse files Browse the repository at this point in the history
cast int
  • Loading branch information
mtworoz authored Dec 16, 2024
2 parents 1fc2a7a + 8e071f3 commit eaed6cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions includes/cart/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ function edd_get_cart_quantity() {
* @return string Cart key of the new item
*/
function edd_add_to_cart( $download_id, $options = array() ) {
$download_id = (int)$download_id;
$download = get_post( $download_id );

if (!$download) {
Expand Down

0 comments on commit eaed6cb

Please sign in to comment.