How to create a widget with a populated dropdown?

I finally got the widget built. I hope this will help another newbie. <?php /* * Plugin Name: Events Widget Description: This widget allows the user to select an Event name. Version: 0.5 Author: Dan Statham */ function gdd_Events_load_widgets() { write_log(‘gdd _Events_load_widgets’); }// gdd_Events_load_widgets // Register the widget function my_register_events_widget() { register_widget( ‘gdd_Events_load_widgets’ ); } … Read more

Google Maps for Woocommerce Checkout

I am looking for a similar thing at the moment and am investigating 2 different plugins: https://codecanyon.net/item/woocommerce-checkout-location-picker/6811588 https://wordpress.org/plugins/checkout-address-sugessions-for-woocommerce/ I will be trying out the second plugin first, as it is free. Hope that helps (UPDATE) Neither of the above plugins did the job unfortunately, I would not recommend

How to pass bloginfo(url) in a jquery

You should be able to use a relative URL. window.location.replace(“/contact-us”); If that code was run on any page on example.com, it would redirect to example.com/contact-us

How can I change page content for good once a button is pressed?

Do I understand problem correctly? [QR1] -> Scan -> [Claim listing] -> [QR1->QR2 claimed] -> [QR2] Here what comes to mind class RenderPage function gen_qr(is_claimed) if (is_claimed) return generate_qr2; else return generate_qr1 function display_page() $qr_code = gen_qr(get_option(‘<page_id>_qr’)); // on button click update_option(‘<page_id>_qr’) It’s a bit schematic, but I think you got the idea. P.S. Just … Read more

How can I see $post object in frontend from functions.php?

Adding: global $post; print_r ($post); alone, won’t work in functions.php (becuase WP’s core functions etc wouldn’t be loaded). It would inside a relevant template file, but not in functions.php. To make it work in functions.php, you need to do it inside an function that is hooked to an appropriate hook. The “appropriate” hook may depend … Read more

Customize the “Available for back order” text for specific variation

I did it. The “stock.available-on-backorder.step-1” is the css class of the availability text ( Available- made to measure ). <?php add_action( ‘woocommerce_before_add_to_cart_quantity’, ‘made_to_measure’ ); function made_to_measure() { global $product; if ( $product->is_type(‘variable’) ) { ?> <script> jQuery(document).ready(function($) { $(‘input.variation_id’).change( function(){ if( ” != $(‘input.variation_id’).val() ) { //var var_id = $(‘input.variation_id’).val(); var pa_size = jQuery( “#pa_size” … Read more