'; woocommerce_form_field( self::FIELD_NAME, array( 'type' => 'textarea', 'class' => array( 'weship-acs-sync-gift-note form-row-wide' ), 'label' => __( 'Gift note', 'weship-acs-sync-for-woocommerce' ), 'placeholder' => __( 'Add a gift message to include with this order', 'weship-acs-sync-for-woocommerce' ), 'required' => false, ), $checkout->get_value( self::FIELD_NAME ) ); echo ''; } /** * Save the posted Gift Note onto the order being created. * * @param WC_Order $order Order. */ public function save_field( $order ) { if ( empty( $_POST[ self::FIELD_NAME ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing return; } $order->update_meta_data( Weship_ACS_Sync_Order_Sync::META_GIFT_NOTE, sanitize_textarea_field( wp_unslash( $_POST[ self::FIELD_NAME ] ) ) // phpcs:ignore WordPress.Security.NonceVerification.Missing ); } }