auto-patch 638-dev-dev01-2024-05-14T20_44_36
This commit is contained in:
@@ -15,6 +15,8 @@ use Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore;
|
||||
use Automattic\WooCommerce\Utilities\{ FeaturesUtil, OrderUtil, PluginUtil };
|
||||
use Automattic\WooCommerce\Internal\Utilities\BlocksUtil;
|
||||
use Automattic\WooCommerce\Proxies\LegacyProxy;
|
||||
use Automattic\WooCommerce\Blocks\Package;
|
||||
use Automattic\WooCommerce\Blocks\Domain\Services\CheckoutFields;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
@@ -364,7 +366,7 @@ class WC_Tracker {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if the helper is connected to Woo.com
|
||||
* Check to see if the helper is connected to WooCommerce.com
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -958,7 +960,6 @@ class WC_Tracker {
|
||||
'enable_myaccount_registration' => get_option( 'woocommerce_enable_myaccount_registration' ),
|
||||
'registration_generate_username' => get_option( 'woocommerce_registration_generate_username' ),
|
||||
'registration_generate_password' => get_option( 'woocommerce_registration_generate_password' ),
|
||||
'hpos_enabled' => get_option( 'woocommerce_feature_custom_order_tables_enabled' ),
|
||||
'hpos_sync_enabled' => get_option( 'woocommerce_custom_orders_table_data_sync_enabled' ),
|
||||
'hpos_cot_authoritative' => get_option( 'woocommerce_custom_orders_table_enabled' ),
|
||||
'hpos_transactions_enabled' => get_option( 'woocommerce_use_db_transactions_for_custom_orders_table_data_sync' ),
|
||||
@@ -1090,6 +1091,19 @@ class WC_Tracker {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tracker data for additional fields on the checkout page.
|
||||
*
|
||||
* @return array Array of fields count and names.
|
||||
*/
|
||||
public static function get_checkout_additional_fields_data() {
|
||||
$additional_fields_controller = Package::container()->get( CheckoutFields::class );
|
||||
|
||||
return array(
|
||||
'fields_count' => count( $additional_fields_controller->get_additional_fields() ),
|
||||
'fields_names' => array_keys( $additional_fields_controller->get_additional_fields() ),
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Get info about the cart & checkout pages.
|
||||
*
|
||||
@@ -1104,6 +1118,8 @@ class WC_Tracker {
|
||||
|
||||
$pickup_location_data = self::get_pickup_location_data();
|
||||
|
||||
$additional_fields_data = self::get_checkout_additional_fields_data();
|
||||
|
||||
return array(
|
||||
'cart_page_contains_cart_shortcode' => self::post_contains_text(
|
||||
$cart_page_id,
|
||||
@@ -1119,6 +1135,7 @@ class WC_Tracker {
|
||||
'checkout_page_contains_checkout_block' => $checkout_block_data['page_contains_block'],
|
||||
'checkout_block_attributes' => $checkout_block_data['block_attributes'],
|
||||
'pickup_location' => $pickup_location_data,
|
||||
'additional_fields' => $additional_fields_data,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user