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

@@ -566,12 +566,14 @@ class WC_REST_Products_V2_Controller extends WC_REST_CRUD_Controller {
$attributes[] = array(
'id' => wc_attribute_taxonomy_id_by_name( $name ),
'name' => $this->get_attribute_taxonomy_name( $name, $_product ),
'slug' => $name,
'option' => $option_term && ! is_wp_error( $option_term ) ? $option_term->name : $attribute,
);
} else {
$attributes[] = array(
'id' => 0,
'name' => $this->get_attribute_taxonomy_name( $name, $_product ),
'slug' => $name,
'option' => $attribute,
);
}
@@ -581,6 +583,7 @@ class WC_REST_Products_V2_Controller extends WC_REST_CRUD_Controller {
$attributes[] = array(
'id' => $attribute['is_taxonomy'] ? wc_attribute_taxonomy_id_by_name( $attribute['name'] ) : 0,
'name' => $this->get_attribute_taxonomy_name( $attribute['name'], $product ),
'slug' => $attribute['name'],
'position' => (int) $attribute['position'],
'visible' => (bool) $attribute['is_visible'],
'variation' => (bool) $attribute['is_variation'],

View File

@@ -149,6 +149,12 @@ class WC_REST_System_Status_V2_Controller extends WC_REST_Controller {
'context' => array( 'view' ),
'readonly' => true,
),
'store_id' => array(
'description' => __( 'WooCommerce Store Identifier.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view' ),
'readonly' => true,
),
'version' => array(
'description' => __( 'WooCommerce version.', 'woocommerce' ),
'type' => 'string',
@@ -551,7 +557,7 @@ class WC_REST_System_Status_V2_Controller extends WC_REST_Controller {
),
),
'wccom_connected' => array(
'description' => __( 'Is store connected to WooCommerce.com?', 'woocommerce' ),
'description' => __( 'Is store connected to Woo.com?', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view' ),
'readonly' => true,
@@ -806,7 +812,7 @@ class WC_REST_System_Status_V2_Controller extends WC_REST_Controller {
if ( false === $get_response_code || is_wp_error( $get_response_code ) ) {
$response = wp_safe_remote_get(
'https://woocommerce.com/wc-api/product-key-api?request=ping&network=' . ( is_multisite() ? '1' : '0' ),
'https://woo.com/wc-api/product-key-api?request=ping&network=' . ( is_multisite() ? '1' : '0' ),
array(
'user-agent' => 'WooCommerce/' . WC()->version . '; ' . get_bloginfo( 'url' ),
)
@@ -826,6 +832,7 @@ class WC_REST_System_Status_V2_Controller extends WC_REST_Controller {
return array(
'home_url' => get_option( 'home' ),
'site_url' => get_option( 'siteurl' ),
'store_id' => get_option( \WC_Install::STORE_ID_OPTION, null ),
'version' => WC()->version,
'log_directory' => WC_LOG_DIR,
'log_directory_writable' => (bool) @fopen( WC_LOG_DIR . 'test-log.log', 'a' ), // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_system_read_fopen