woocommerce_grant_product_download_access

woocommerce_grant_product_download_access

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.7.1

do_action('woocommerce_grant_product_download_access') is found 2 times:

  • /includes/data-stores/class-wc-customer-download-data-store.php line 46
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
        $data = array_intersect_key( $data, array_flip( self::DOWNLOAD_PERMISSION_DB_FIELDS ) );
     
        $id = $this->insert_new_download_permission( $data );
     
        do_action( 'woocommerce_grant_product_download_access', $data );
     
        return $id;
    }
     
    /**
     * Create download permission for a user.
  • /includes/data-stores/class-wc-customer-download-data-store.php line 76
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
            $download->set_id( $inserted_id );
            $download->apply_changes();
        }
     
        do_action( 'woocommerce_grant_product_download_access', $data );
    }
     
    /**
     * Create download permission for a user, from an array of data.
     * Assumes that all the keys in the passed data are valid.
     *

See this hook used in plugins: