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 Custom Product Note Field | |
add_action('woocommerce_single_product_summary', 'custom_product_note', 100); | |
function custom_product_note() { | |
echo '<br><div>'; | |
woocommerce_form_field('customer_note', array( | |
'type' => 'textarea', | |
'class' => array('my-field-class form-row-wide'), | |
'label' => __('Product note'), |
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> | |
// Initialize the agent at application startup. | |
const fpPromise = import('https://openfpcdn.io/fingerprintjs/v4') | |
.then(FingerprintJS => FingerprintJS.load()) | |
// Get the visitor identifier when you need it. | |
fpPromise | |
.then(fp => fp.get()) | |
.then(result => { | |
// This is the visitor identifier: |
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
Random dice = new Random(); |
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
// Perform your Ajax call here | |
$.ajax({ | |
// ... your Ajax settings ... | |
success: function(response) { | |
// After the Ajax call is successful and content is loaded | |
// Scroll to the target div with animation | |
$("html, body").animate( | |
{ | |
scrollTop: $("#wps-comment-list").offset().top - 50 | |
}, |
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
window.onload = function () { | |
function getCookieValue(name) { | |
const cookies = document.cookie.split('; '); | |
for (const cookie of cookies) { | |
const [cookieName, cookieValue] = cookie.split('='); | |
if (cookieName === name) { | |
return cookieValue; | |
} | |
} |
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
public function __construct() | |
{ | |
$this->actions = array(); | |
$this->filters = array(); | |
$this->shortcodes = array(); | |
} | |
/** | |
* Add a new shortcode to the collection to be registered with WordPress |
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> | |
jQuery(document).ready(function($) { | |
// Uploading files | |
var file_frame; | |
var wp_media_post_id = wp.media.model.settings.post.id; // Store the old id | |
var set_to_post_id = <?php echo $post->ID; ?>; // Set this | |
jQuery(document).on('click', '.bk-image-upload', function(event) { | |
event.preventDefault(); | |
file_frame = ''; |
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
.bootstrapiso{/*! | |
* Bootstrap v4.4.1 (https://getbootstrap.com/) | |
* Copyright 2011-2019 The Bootstrap Authors | |
* Copyright 2011-2019 Twitter, Inc. | |
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
*/}.bootstrapiso :root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}.bootstrapiso *,.bootstra |
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
1. Twilio verification with phone number | |
https://codelapan.com/post/how-to-verify-account-in-laravel-8-with-twilio-verify | |
https://www.twilio.com/blog/verify-phone-numbers-php-laravel-application-twilio-verify | |
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
* To Seed Specific Seeder in Laravel | |
php artisan db:seed --class=PermissionsDemoSeeder |
NewerOlder