woocommerce_order_downloads_table_show_downloads

FILTER woocommerce\includes\wc-template-functions.php (ligne 2913) github
Determines if the order downloads table should be shown (in the context of the order details template). By default, this is true if the order has at least one dowloadable items and download is permitted (which is partly determined by the order status). For special cases, though, this can be overridden and the downloads table can be forced to render (or forced not to render).

Paramètres

Entrée :
( $order->has_downloadable_item(
Sortie :
@param bool     $show_downloads If the downloads table should be shown.
@param WC_Order $order          The related order.

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_order_downloads_table_show_downloads'
add_filter('woocommerce_order_downloads_table_show_downloads', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(( $order->has_downloadable_item() {
    // Modifier la valeur
    return ( $order->has_downloadable_item(;
}

Actualités

Chargement des actualités...