This file contains hidden or 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
<script> | |
document.addEventListener("DOMContentLoaded", initializeOnSiteJavascript); | |
function initializeOnSiteJavascript() { | |
// Track viewed products | |
const productId = "{{ product.id }}"; | |
const productTitle = "{{ product.title }}"; | |
const productHandle = "{{ product.handle }}"; | |
const marketId = "{{ localization.market.id }}"; | |
const trackViewedProducts = () => { |
This file contains hidden or 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
{"version":1,"resource":"file:///Users/keiraclimson/Developer/viaglamour/apps/order-editing-staging/shopify.app.toml","entries":[{"id":"UXwe.toml","timestamp":1740085416567},{"id":"zW6p.toml","timestamp":1740085428069},{"id":"FKFP.toml","timestamp":1740091160307},{"id":"pli8.toml","timestamp":1740092582552}]} |
This file contains hidden or 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
const HOSTNAME = "iricocanada.com"; | |
const COOKIE_NAME = "__bentocore"; | |
const NAME = "bentocore"; | |
function getCookie(request, name) { | |
let result = ""; | |
const cookieString = request.headers.get("Cookie"); | |
if (cookieString) { | |
const cookies = cookieString.split(";"); | |
cookies.forEach((cookie) => { |
This file contains hidden or 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
{ | |
"data":[ | |
{ | |
"Tiger Nixon", | |
"System Architect", | |
"Edinburgh", | |
61, | |
"2011/04/25", | |
"$320,800" | |
}, |
This file contains hidden or 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
// Original Way | |
add_action('init', function() { | |
$host = $_SERVER['REQUEST_URI']; | |
$directory = explode('/', $_SERVER['REQUEST_URI']); | |
define('WOOCOMMERCE_CHECKOUT', true); | |
$load = locate_template('woocommerce/checkout-themeA.php', true); | |
if ($load) { |
This file contains hidden or 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
.coupon { | |
display: none!important; | |
} | |
article.post .post-meta .date { | |
margin-bottom: 0px; | |
} | |
article.post .post-meta .date { | |
padding-bottom: 0px; | |
border-bottom: 0px!important; |
This file contains hidden or 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
import proxy from "@fly/proxy" | |
import { forceSSL } from './lib/utilities' | |
const origin = proxy("https://viaglamour.com/") | |
/** | |
* Rewrite the path to /store/<hostname> | |
*/ | |
function rewriteRequest(req) { | |
const url = new URL(req.url) | |
let path = "/store/" + url.hostname.replace(/\.[a-z]+/, '') |
This file contains hidden or 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
#www.ashley.com -> https://viaglamour.com/ashley while displaying https://www.ashley.com URL | |
server { | |
# catch all for domains forwarded to site that don't qualify for other server blocks. | |
listen 80 default_server; | |
# get the domain name without extension to determine URL path later. | |
# regex: ^(.*?www\.)(?<domain>.+)?(.*?)(.*)\. | |
# test it on https://regex101.com/r/0GFSyj/1 |
This file contains hidden or 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
$headers = array( | |
'User-Agent' => 'Stripe Connect' | |
); | |
$response = wp_remote_post( $endpoint, array( | |
'headers' => $headers, | |
'body' => http_build_query( $data ), | |
) | |
); |
This file contains hidden or 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
/*Afghanistan*/ | |
'AF' => | |
/*Aland Islands*/ | |
'AX' => | |
/*Albania*/ | |
'AL' => | |
/*Algeria*/ | |
'DZ' => | |
/*American Samoa*/ | |
'AS' => |
NewerOlder