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
addEventListener('fetch', event => { | |
event.respondWith(blockCountries(event.request)) | |
}) | |
//Add countries to this Set to Allow them | |
const countries = new Set([ | |
"US", // United States | |
"SG", // Singapore | |
"BR" // Brazil | |
]) |
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
// Validate password form | |
add_action('elementor_pro/forms/validation', function ( $record, $ajax_handler ) { | |
//make sure its our form | |
$form_name = $record->get_form_settings( 'form_name' ); | |
// Replace MY_FORM_NAME with the name you gave your form | |
if ( 'Sign-up' !== $form_name ) { | |
return; | |
} |
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
<?php | |
echo "<pre>\n"; | |
print_r( gd_info() ); | |
echo "</pre>\n\n"; | |
?> |
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
//Show only lowest prices in WooCommerce variable products | |
add_filter( 'woocommerce_variable_sale_price_html', 'wpglorify_variation_price_format', 10, 2 ); | |
add_filter( 'woocommerce_variable_price_html', 'wpglorify_variation_price_format', 10, 2 ); | |
function wpglorify_variation_price_format( $price, $product ) { | |
// Main Price | |
$prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) ); | |
$price = $prices[0] !== $prices[1] ? sprintf( __( 'From: %1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] ); |
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
/* WooCommerce: The Code Below Removes Checkout Fields */ | |
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); | |
function custom_override_checkout_fields( $fields ) { | |
unset($fields['billing']['billing_first_name']); | |
unset($fields['billing']['billing_last_name']); | |
unset($fields['billing']['billing_company']); | |
unset($fields['billing']['billing_address_1']); | |
unset($fields['billing']['billing_address_2']); | |
unset($fields['billing']['billing_city']); | |
unset($fields['billing']['billing_postcode']); |
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
RewriteEngine On | |
## no-www -> www | |
RewriteCond %{HTTP_HOST} !^www\. | |
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE,QSA] | |
## http -> https | |
RewriteCond %{HTTPS} off | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE,QSA] |
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
<?php | |
add_filter( 'woocommerce_checkout_fields' , 'custom_remove_woo_checkout_fields' ); | |
function custom_remove_woo_checkout_fields( $fields ) { | |
// remove billing fields | |
unset($fields['billing']['billing_first_name']); | |
unset($fields['billing']['billing_last_name']); | |
unset($fields['billing']['billing_company']); |
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
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] | |
Header always set Content-Security-Policy "upgrade-insecure-requests;" | |
# BEGIN WordPress | |
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are | |
# dynamically generated, and should only be modified via WordPress filters. | |
# Any changes to the directives between these markers will be overwritten. | |
<IfModule mod_rewrite.c> |
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
3.97 - - [14/Sep/2022:19:22:05 +0000] "GET /page/2/?s=Daylong+&post_type=product HTTP/2" 200 42385 "https://www.maparatunisie.tn/?s=Daylong+&post_type=product" "Mozilla/5.0 (Linux; Android 12; CPH2113) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36" | |
"197.19.253.97 - - [14/Sep/2022:19:22:09 +0000] "GET /wp-content/uploads/2021/02/daylong-after-sun-repair-100ml.webp HTTP/2" 200 12736 "https://www.maparatunisie.tn/page/2/?s=Daylong+&post_type=product" "Mozilla/5.0 (Linux; Android 12; CPH2113) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36" | |
"197.19.253.97 - - [14/Sep/2022:19:22:09 +0000] "GET /wp-content/uploads/2022/07/ma-routine-peau-hypersensible.jpg HTTP/2" 200 98498 "https://www.maparatunisie.tn/page/2/?s=Daylong+&post_type=product" "Mozilla/5.0 (Linux; Android 12; CPH2113) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36" | |
"207.46.13.85 - - [14/Sep/2022:19:22:08 +0000] "GET /boutique/page/192 HTTP/2" 301 0 "-" "Mozilla/5. |
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
/19 18:51:01 [error] 1270046#1270046: *1308917 upstream timed out (110: Connection timed out) while reading upstream, client: 197.26.111.61, server: maparatunisie.tn, request: "GET / HTTP/2.0", subrequest: "/redis-store", upstream: "redis2://unix:/var/run/redis-page/redis-page.sock:", host: "www.maparatunisie.tn", referrer: "https://www.maparatunisie.tn/categorie-produit/solaire/?campaignid=20704471184&adgroupid=&keyword=&device=m&gad_source=1&gclid=CjwKCAjwl6-3BhBWEiwApN6_koD9rXoazTSBm6f46kInRbo05Qs0C2xkPjgXRf6QFuvzkCO7M7fwfxoCP30QAvD_BwE" | |
2024/09/19 18:51:01 [error] 1270046#1270046: *1308917 srcache_store subrequest failed: rc=0 status=504 while sending to client, client: 197.26.111.61, server: maparatunisie.tn, request: "GET / HTTP/2.0", subrequest: "/redis-store", upstream: "redis2://unix:/var/run/redis-page/redis-page.sock", host: "www.maparatunisie.tn", referrer: "https://www.maparatunisie.tn/categorie-produit/solaire/?campaignid=20704471184&adgroupid=&keyword=&device=m&gad_source=1&gclid=CjwKCAjwl6-3Bh |
OlderNewer