Skip to content

Commit 408020e

Browse files
hide checkout field in order confirmation email from woocommerce
1 parent 1430601 commit 408020e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

integrations/woocommerce/class-woocommerce.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public function add_checkout_block_field()
102102
'type' => 'checkbox',
103103
'label' => $this->get_label_text(),
104104
'optionalLabel' => $this->get_label_text(),
105+
'show_in_order_confirmation' => false,
105106
]
106107
);
107108
}
@@ -162,8 +163,7 @@ public function triggered($order_id = null)
162163
if (class_exists(Package::class) && class_exists(CheckoutFields::class)) {
163164
$checkout_fields = Package::container()->get(CheckoutFields::class);
164165

165-
if (
166-
$checkout_fields
166+
if ($checkout_fields
167167

168168
&& method_exists($checkout_fields, 'get_field_from_object')
169169
// method was private in earlier versions of WooCommerce, so check if callable

0 commit comments

Comments
 (0)