Merged in feature/117-dev-dev01 (pull request #8)

auto-patch  117-dev-dev01-2023-12-15T16_09_06

* auto-patch  117-dev-dev01-2023-12-15T16_09_06
This commit is contained in:
Tony Volpe
2023-12-15 16:10:57 +00:00
parent 0825f6bd5f
commit 3dc9eca989
1424 changed files with 28118 additions and 10097 deletions

View File

@@ -249,6 +249,13 @@ class WC_Install {
*/
const NEWLY_INSTALLED_OPTION = 'woocommerce_newly_installed';
/**
* Option name used to uniquely identify installations of WooCommerce.
*
* @var string
*/
const STORE_ID_OPTION = 'woocommerce_store_id';
/**
* Hook in tabs.
*/
@@ -438,6 +445,7 @@ class WC_Install {
self::set_paypal_standard_load_eligibility();
self::update_wc_version();
self::maybe_update_db_version();
self::maybe_set_store_id();
delete_transient( 'wc_installing' );
@@ -610,6 +618,17 @@ class WC_Install {
}
}
/**
* Set the Store ID if not already present.
*
* @since 8.4.0
*/
public static function maybe_set_store_id() {
if ( ! get_option( self::STORE_ID_OPTION, false ) ) {
add_option( self::STORE_ID_OPTION, wp_generate_uuid4() );
}
}
/**
* Update WC version to current.
*/
@@ -1223,11 +1242,10 @@ class WC_Install {
$product_attributes_lookup_table_creation_sql = wc_get_container()->get( DataRegenerator::class )->get_table_creation_sql();
$feature_controller = wc_get_container()->get( FeaturesController::class );
$hpos_enabled =
$hpos_enabled =
$feature_controller->feature_is_enabled( DataSynchronizer::ORDERS_DATA_SYNC_ENABLED_OPTION ) || $feature_controller->feature_is_enabled( CustomOrdersTableController::CUSTOM_ORDERS_TABLE_USAGE_ENABLED_OPTION ) ||
self::should_enable_hpos_for_new_shop()
;
$hpos_table_schema = $hpos_enabled ? wc_get_container()->get( OrdersTableDataStore::class )->get_database_schema() : '';
self::should_enable_hpos_for_new_shop();
$hpos_table_schema = $hpos_enabled ? wc_get_container()->get( OrdersTableDataStore::class )->get_database_schema() : '';
$tables = "
CREATE TABLE {$wpdb->prefix}woocommerce_sessions (
@@ -1962,14 +1980,14 @@ $hpos_table_schema;
*
* @since 2.7.0
*/
$docs_url = apply_filters( 'woocommerce_docs_url', 'https://docs.woocommerce.com/documentation/plugins/woocommerce/' );
$docs_url = apply_filters( 'woocommerce_docs_url', 'https://woo.com/documentation/plugins/woocommerce/' );
/**
* The WooCommerce API documentation URL.
*
* @since 2.2.0
*/
$api_docs_url = apply_filters( 'woocommerce_apidocs_url', 'https://docs.woocommerce.com/wc-apidocs/' );
$api_docs_url = apply_filters( 'woocommerce_apidocs_url', 'https://woo.com/wc-apidocs/' );
/**
* The community WooCommerce support URL.
@@ -1983,7 +2001,7 @@ $hpos_table_schema;
*
* @since
*/
$support_url = apply_filters( 'woocommerce_support_url', 'https://woocommerce.com/my-account/create-a-ticket/' );
$support_url = apply_filters( 'woocommerce_support_url', 'https://woo.com/my-account/create-a-ticket/' );
$row_meta = array(
'docs' => '<a href="' . esc_url( $docs_url ) . '" aria-label="' . esc_attr__( 'View WooCommerce documentation', 'woocommerce' ) . '">' . esc_html__( 'Docs', 'woocommerce' ) . '</a>',