This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Use full link for WordPress resources when using wp_resource_hints #7211
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rubikuserbot
requested review from
a team and
tarunvijwani
and removed request for
a team
September 23, 2022 09:55
The release ZIP for this PR is accessible via:
|
Size Change: 0 B Total Size: 893 kB ℹ️ View Unchanged
|
nielslange
approved these changes
Sep 23, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! ⛴
senadir
added
type: bug
The issue/PR concerns a confirmed bug.
block: checkout
Issues related to the checkout block.
labels
Sep 23, 2022
ralucaStan
added
the
status: blocker
Used on issues or pulls that block work from being released.
label
Sep 23, 2022
ralucaStan
changed the title
use full link for WordPress resources when using wp_resource_hints
Use full link for WordPress resources when using wp_resource_hints
Sep 23, 2022
gigitux
pushed a commit
that referenced
this pull request
Sep 23, 2022
Co-authored-by: Niels Lange <[email protected]>
gigitux
added a commit
that referenced
this pull request
Sep 23, 2022
* use full link for WordPress resources (#7211) Co-authored-by: Niels Lange <[email protected]> * Empty commit for release pull request * update readme * add testing instructions * add zip file link * update testing instructions and changelog entry * Bumping version strings to new version. Co-authored-by: Seghir Nadir <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Luigi <[email protected]>
5 tasks
senadir
added a commit
that referenced
this pull request
Sep 23, 2022
Co-authored-by: Niels Lange <[email protected]>
alexflorisca
pushed a commit
that referenced
this pull request
Sep 23, 2022
* Empty commit for release pull request * use full link for WordPress resources (#7211) Co-authored-by: Niels Lange <[email protected]> * add readme * add testing steps * Bumping version strings to new version. Co-authored-by: github-actions <[email protected]> Co-authored-by: Seghir Nadir <[email protected]> Co-authored-by: Niels Lange <[email protected]>
Closed
5 tasks
gigitux
added a commit
that referenced
this pull request
Oct 31, 2022
* use full link for WordPress resources (#7211) Co-authored-by: Niels Lange <[email protected]> * Empty commit for release pull request * update readme * add testing instructions * add zip file link * update testing instructions and changelog entry * Bumping version strings to new version. * Empty commit for release pull request * Update styles of the Filter by Attribute dropdown so it looks good in TT3 (#7506) * Use theme's body background color as the mini cart contents default background color (#7510) Co-authored-by: Albert Juhé Lluveras <[email protected]> * Price Slider: use `currentColor` for the slider (#7527) * Fixed Price Slider Issue Located where the price slider was hard coded and replaced it. * fix CSS lint * use currentColor instead of hard-coded color for the slider of the Filter By Price block #7130 use currentColor instead of hard-coded color for the slider of the Filte By Price block * use currentColor instead of hard-coded color for the slider of the Filter By Price block #7130 use currentColor instead of hard-coded color for the slider of the Filte By Price block * remove background-color Co-authored-by: EmptySet-Exe <[email protected]> Co-authored-by: Niels Lange <[email protected]> * Make price slider 'inactive' range half transparent so it looks better in dark themes (#7525) * Fix inconsistent button styling with TT3 (#7516) * fix inconsistent button styling with TT3 * use wc_wp_theme_get_element_class_name * add check to be sure that wc_wp_theme_get_element_class_name function exists * Fix Mini Cart Block global styles #7379 (#7515) * Fix Mini Cart Block global styles #7379 Fix Mini Cart Block global styles * add font_size * Empty commit for release pull request * add changelog and testing instructions * add zip link for testing * Bumping version strings to new version. Co-authored-by: Seghir Nadir <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Luigi <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Tung Du <[email protected]> Co-authored-by: EmptySet-Exe <[email protected]>
senadir
added a commit
to senadir/woocommerce-blocks
that referenced
this pull request
Nov 12, 2022
Co-authored-by: Niels Lange <[email protected]>
senadir
added a commit
to senadir/woocommerce-blocks
that referenced
this pull request
Nov 12, 2022
* use full link for WordPress resources (woocommerce#7211) Co-authored-by: Niels Lange <[email protected]> * Empty commit for release pull request * update readme * add testing instructions * add zip file link * update testing instructions and changelog entry * Bumping version strings to new version. Co-authored-by: Seghir Nadir <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Luigi <[email protected]>
senadir
added a commit
to senadir/woocommerce-blocks
that referenced
this pull request
Nov 12, 2022
* use full link for WordPress resources (woocommerce#7211) Co-authored-by: Niels Lange <[email protected]> * Empty commit for release pull request * update readme * add testing instructions * add zip file link * update testing instructions and changelog entry * Bumping version strings to new version. * Empty commit for release pull request * Update styles of the Filter by Attribute dropdown so it looks good in TT3 (woocommerce#7506) * Use theme's body background color as the mini cart contents default background color (woocommerce#7510) Co-authored-by: Albert Juhé Lluveras <[email protected]> * Price Slider: use `currentColor` for the slider (woocommerce#7527) * Fixed Price Slider Issue Located where the price slider was hard coded and replaced it. * fix CSS lint * use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce#7130 use currentColor instead of hard-coded color for the slider of the Filte By Price block * use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce#7130 use currentColor instead of hard-coded color for the slider of the Filte By Price block * remove background-color Co-authored-by: EmptySet-Exe <[email protected]> Co-authored-by: Niels Lange <[email protected]> * Make price slider 'inactive' range half transparent so it looks better in dark themes (woocommerce#7525) * Fix inconsistent button styling with TT3 (woocommerce#7516) * fix inconsistent button styling with TT3 * use wc_wp_theme_get_element_class_name * add check to be sure that wc_wp_theme_get_element_class_name function exists * Fix Mini Cart Block global styles woocommerce#7379 (woocommerce#7515) * Fix Mini Cart Block global styles woocommerce#7379 Fix Mini Cart Block global styles * add font_size * Empty commit for release pull request * add changelog and testing instructions * add zip link for testing * Bumping version strings to new version. Co-authored-by: Seghir Nadir <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Luigi <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Tung Du <[email protected]> Co-authored-by: EmptySet-Exe <[email protected]>
senadir
added a commit
to senadir/woocommerce-blocks
that referenced
this pull request
Nov 12, 2022
* use full link for WordPress resources (woocommerce#7211) Co-authored-by: Niels Lange <[email protected]> * Empty commit for release pull request * update readme * add testing instructions * add zip file link * update testing instructions and changelog entry * Bumping version strings to new version. Co-authored-by: Seghir Nadir <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Luigi <[email protected]>
senadir
added a commit
to senadir/woocommerce-blocks
that referenced
this pull request
Nov 12, 2022
* use full link for WordPress resources (woocommerce#7211) Co-authored-by: Niels Lange <[email protected]> * Empty commit for release pull request * update readme * add testing instructions * add zip file link * update testing instructions and changelog entry * Bumping version strings to new version. * Empty commit for release pull request * Update styles of the Filter by Attribute dropdown so it looks good in TT3 (woocommerce#7506) * Use theme's body background color as the mini cart contents default background color (woocommerce#7510) Co-authored-by: Albert Juhé Lluveras <[email protected]> * Price Slider: use `currentColor` for the slider (woocommerce#7527) * Fixed Price Slider Issue Located where the price slider was hard coded and replaced it. * fix CSS lint * use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce#7130 use currentColor instead of hard-coded color for the slider of the Filte By Price block * use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce#7130 use currentColor instead of hard-coded color for the slider of the Filte By Price block * remove background-color Co-authored-by: EmptySet-Exe <[email protected]> Co-authored-by: Niels Lange <[email protected]> * Make price slider 'inactive' range half transparent so it looks better in dark themes (woocommerce#7525) * Fix inconsistent button styling with TT3 (woocommerce#7516) * fix inconsistent button styling with TT3 * use wc_wp_theme_get_element_class_name * add check to be sure that wc_wp_theme_get_element_class_name function exists * Fix Mini Cart Block global styles woocommerce#7379 (woocommerce#7515) * Fix Mini Cart Block global styles woocommerce#7379 Fix Mini Cart Block global styles * add font_size * Empty commit for release pull request * add changelog and testing instructions * add zip link for testing * Bumping version strings to new version. Co-authored-by: Seghir Nadir <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Luigi <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Tung Du <[email protected]> Co-authored-by: EmptySet-Exe <[email protected]>
senadir
added a commit
to senadir/woocommerce-blocks
that referenced
this pull request
Nov 20, 2022
* use full link for WordPress resources (woocommerce#7211) Co-authored-by: Niels Lange <[email protected]> * Empty commit for release pull request * update readme * add testing instructions * add zip file link * update testing instructions and changelog entry * Bumping version strings to new version. Co-authored-by: Seghir Nadir <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Luigi <[email protected]>
senadir
added a commit
to senadir/woocommerce-blocks
that referenced
this pull request
Nov 20, 2022
* use full link for WordPress resources (woocommerce#7211) Co-authored-by: Niels Lange <[email protected]> * Empty commit for release pull request * update readme * add testing instructions * add zip file link * update testing instructions and changelog entry * Bumping version strings to new version. * Empty commit for release pull request * Update styles of the Filter by Attribute dropdown so it looks good in TT3 (woocommerce#7506) * Use theme's body background color as the mini cart contents default background color (woocommerce#7510) Co-authored-by: Albert Juhé Lluveras <[email protected]> * Price Slider: use `currentColor` for the slider (woocommerce#7527) * Fixed Price Slider Issue Located where the price slider was hard coded and replaced it. * fix CSS lint * use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce#7130 use currentColor instead of hard-coded color for the slider of the Filte By Price block * use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce#7130 use currentColor instead of hard-coded color for the slider of the Filte By Price block * remove background-color Co-authored-by: EmptySet-Exe <[email protected]> Co-authored-by: Niels Lange <[email protected]> * Make price slider 'inactive' range half transparent so it looks better in dark themes (woocommerce#7525) * Fix inconsistent button styling with TT3 (woocommerce#7516) * fix inconsistent button styling with TT3 * use wc_wp_theme_get_element_class_name * add check to be sure that wc_wp_theme_get_element_class_name function exists * Fix Mini Cart Block global styles woocommerce#7379 (woocommerce#7515) * Fix Mini Cart Block global styles woocommerce#7379 Fix Mini Cart Block global styles * add font_size * Empty commit for release pull request * add changelog and testing instructions * add zip link for testing * Bumping version strings to new version. Co-authored-by: Seghir Nadir <[email protected]> Co-authored-by: Niels Lange <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Luigi <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Tung Du <[email protected]> Co-authored-by: EmptySet-Exe <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
block: checkout
Issues related to the checkout block.
status: blocker
Used on issues or pulls that block work from being released.
type: bug
The issue/PR concerns a confirmed bug.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In 7.3.0 (#5553), we introduced resource hinting for cart and checkout, the way we did that is by checking if we're going to visit Cart/Checkout (via cart content) and gather up cart/checkout scripts and their dependencies before passing them to
wp_resource_hints
.The issue that was happening is that
wp_resource_hints
didn't assume anything about the url and printed it as is, and WordPress core dependencies are registered with a relative path.For WordPress, it's not until WP_Scripts is about to print them that this is fixed, for us, we didn't get access to that luxury so they were printed with relative paths.
In normal installs, this is not an issue, but for subfolder installs, it is one because the root link doesn't match the website link and this caused several 404 in the console and even cart fragments requests to fail.
In this PR, we match the same behavior that exists in
WP_Scripts
and prefix scripts with the correct url.kudos for @nielslange for the initial implementation of this PR.
Fixes #6186
User Facing Testing
/wp-includes
, you shouldn't see any relative links in them ( as inhref="/wp-includes/js/..."
) but that everything starts with a full link.WooCommerce Visibility
Changelog