Skip to content
This repository was archived by the owner on Jul 12, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelogs/update-8294-use-wc-version-as-cache-buster
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: Tweak

Use WC_VERSION as cache buster for assets #8308
2 changes: 1 addition & 1 deletion src/Features/OnboardingTasks/Tasks/Appearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function possibly_add_return_notice_script( $hook ) {
'onboarding-homepage-notice',
Loader::get_url( 'wp-admin-scripts/onboarding-homepage-notice', 'js' ),
array_merge( array( WC_ADMIN_APP ), $script_assets ['dependencies'] ),
WC_ADMIN_VERSION_NUMBER,
WC_VERSION,
true
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Features/OnboardingTasks/Tasks/Products.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function possibly_add_manual_return_notice_script( $hook ) {
'onboarding-product-notice',
Loader::get_url( 'wp-admin-scripts/onboarding-product-notice', 'js' ),
array_merge( array( WC_ADMIN_APP ), $script_assets ['dependencies'] ),
WC_ADMIN_VERSION_NUMBER,
WC_VERSION,
true
);
}
Expand Down Expand Up @@ -136,7 +136,7 @@ public function possibly_add_import_return_notice_script( $hook ) {
'onboarding-product-import-notice',
Loader::get_url( 'wp-admin-scripts/onboarding-product-import-notice', 'js' ),
array_merge( array( WC_ADMIN_APP ), $script_assets ['dependencies'] ),
WC_ADMIN_VERSION_NUMBER,
WC_VERSION,
true
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Features/OnboardingTasks/Tasks/Tax.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function possibly_add_return_notice_script() {
'onboarding-tax-notice',
Loader::get_url( 'wp-admin-scripts/onboarding-tax-notice', 'js' ),
array_merge( array( WC_ADMIN_APP ), $script_assets ['dependencies'] ),
WC_ADMIN_VERSION_NUMBER,
WC_VERSION,
true
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public static function get_file_version( $ext ) {
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
return filemtime( WC_ADMIN_ABSPATH . self::get_path( $ext ) );
}
return WC_ADMIN_VERSION_NUMBER;
return WC_VERSION;
}

/**
Expand Down