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
# How to emulate/activate prefers-color-scheme on Chrome (Desktop): | |
1. Press F12 key (or Command+Shift+C on Mac) | |
2. Click on the tree dots symbol (customize and control DevTools) | |
3. Point your mouse on the more tools option, and then click in rendering option. | |
4. The option Emulate CSS media feature prefers-color-scheme near the end it's your destination ! | |
# How to emulate/activate prefers-color-scheme on Chrome (Mobile): | |
1. Click on the tree dots symbol. |
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
/** | |
* Add tracking code on Order received/thank you page. | |
* | |
* @return void | |
*/ | |
function md_thankyou_page_tracking_code() { | |
if ( ! is_wc_endpoint_url( 'order-received' ) ) { | |
return; | |
} | |
?> |
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
input[type=number]::-webkit-inner-spin-button, | |
input[type=number]::-webkit-outer-spin-button { | |
opacity: 1 | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="refresh" content="0;url=https://www.exmaple1.com/pages/details/"> | |
<title>Redirecting...</title> | |
</head> | |
<body> | |
<p>If you are not redirected automatically, <a href="https://www.exmaple.com/pages/details1/">click here</a>.</p> | |
</body> |
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
add_action ('woocommerce_order_details_after_order_table', 'action_order_details_after_order_table', 20 ); | |
function action_order_details_after_order_table($order) { | |
foreach ( $order->get_items() as $item ) { | |
if ( $course_date = get_field('course_date', $item->get_product_id())) { | |
printf('<p class="course-date">%s: %s<p>', __("Course Date "), $course_date); | |
} | |
} | |
} |
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
add_filter( 'woocommerce_add_to_cart_validation', 'product_only_one_in_cart', 9999 ); | |
function product_only_one_in_cart( $passed ) { | |
wc_empty_cart(); | |
return $passed; | |
} |
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
//add SVG to allowed file uploads | |
function add_file_types_to_uploads($file_types){ | |
$new_filetypes = array(); | |
$new_filetypes['svg'] = 'image/svg'; | |
$file_types = array_merge($file_types, $new_filetypes ); | |
return $file_types; | |
} | |
add_action('upload_mimes', 'add_file_types_to_uploads'); |
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
<script> | |
document.addEventListener('DOMContentLoaded', function () { | |
// Get all elements with the specified class | |
var targetElements = document.querySelectorAll('.berocket_better_labels_position span.b_span_text'); | |
// Loop through each element | |
targetElements.forEach(function (targetElement) { | |
// Get the number and convert it to a float | |
var number = parseFloat(targetElement.textContent); | |
// Check if the number is below 20% | |
if (number < 20) { |
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
// Get all elements with the selector '.variation-Option div' | |
const elements = document.querySelectorAll('.variation-Option div'); | |
// Iterate through each element and remove "(", "+", and ")" excluding content inside <span> | |
elements.forEach(element => { | |
// Iterate through child nodes of the element | |
for (let i = 0; i < element.childNodes.length; i++) { | |
const node = element.childNodes[i]; | |
// Check if the node is a text node and not inside a <span> |
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
{% assign full_url = request.host | append: request.path %} | |
<div style="position: fixed; bottom: 0; right: 0"> | |
{% comment %} {{ "thumbs-up.png" | asset_url | img_tag }} {% endcomment %} | |
<img width="150" height="150" src="https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl={{ full_url }}" alt=""/> | |
</div> | |
{% schema %} | |
{ | |
"name": "App Embed", | |
"target": "body", | |
"settings": [] |
NewerOlder