๐
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
| add_action( 'woocommerce_order_item_meta_end', 'custom_product_info', 20, 4 ); | |
| function custom_product_info ( $item_id, $item, $order, $plain_text ) { | |
| $id = $item->get_product_id(); | |
| $product_info = get_field('customer_email',$id); | |
| if($product_info){ | |
| echo "<p>Customer Message: $product_info</p>"; | |
| }} |
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
| function enqueue_wc_cart_fragments() { | |
| wp_enqueue_script( 'wc-cart-fragments' ); | |
| } | |
| add_action( 'wp_enqueue_scripts', 'enqueue_wc_cart_fragments' ); |
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
| { | |
| "name": "faq-laravel", | |
| "private": true, | |
| "license": "UNLICENSED", | |
| "scripts": { | |
| "shopify": "shopify", | |
| "build": "shopify app build", | |
| "dev": "shopify app dev", | |
| "info": "shopify app info", | |
| "scaffold": "shopify app generate extension", |
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
| {% 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": [] |
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
| // 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 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', 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 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
| //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 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
| 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 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
| 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 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
| <!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> |