woocommerce_create_order

FILTER woocommerce\includes\class-wc-checkout.php (ligne 384) github
Gives plugins an opportunity to create a new order themselves.

Paramètres

Entrée :
null, $this
Sortie :
@param int|null    $order_id Can be set to an order ID to short-circuit the default order creation process.
@param WC_Checkout $checkout Reference to the current WC_Checkout instance.

Utilisation

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

function ma_fonction_filtre(null) {
    // Modifier la valeur
    return null;
}

Actualités

Chargement des actualités...