wpf_woocommerce_apply_tags_checkout

wpf_woocommerce_apply_tags_checkout

#Overview
This filter is run during a WooCommerce checkout, before WP Fusion has applied any tags to the customer.  It can be used to modify the tags that will be applied to the customer. To use the code examples below, add them to your active theme』s functions.php file.
#Parameters

$apply_tags: This is an array of tags that will be applied to the customer
$order: The WooCommerce order object

#Examples
#Apply an additional tag if the order value is over $100
function high_value_tag( $apply_tags, $order ) {

if ( $order->get_total() > 100 ) {
$apply_tags[] = 'High value customer';
}

return $apply_tags;

}

add_filter( 'wpf_woocommerce_apply_tags_checkout', 'high_value_tag', 10, 2 );

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注