hkosnip
// index.php?name=david echo $_GET[‘name’]; // index.php?name=david&surname=adams echo $_GET[‘surname’];Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
// index.php?name=david echo $_GET[‘name’]; // index.php?name=david&surname=adams echo $_GET[‘surname’];Continue reading
add_action( ‘admin_head’, function () { // Bail if WooCommerce isn’t active. if ( ! class_exists( ‘WooCommerce’ ) ) { return; } if ( ! function_exists( ‘get_current_screen’ ) ) { return; } $screen = get_current_screen(); // Legacy order/subscription edit. $is_legacy_order_screen =…Continue reading
/** * Add the product column to the order table. * * @param array $columns The columns. * * @return array The modified columns. */ add_filter( ‘wcv_order_table_columns’, ‘wcv_add_product_column_table_columns’ ); /** * Add the product column to the order table. *…Continue reading
// legacy – for CPT-based orders add_filter( ‘manage_edit-shop_order_columns’, ‘misha_order_items_column’ ); // for HPOS-based orders add_filter( ‘manage_woocommerce_page_wc-orders_columns’, ‘misha_order_items_column’ ); function misha_order_items_column( $columns ) { // let’s add our column before “Total” $columns = array_slice( $columns, 0, 4, true ) // 4…Continue reading
document.addEventListener(“DOMContentLoaded”, function() { const popup = document.getElementById(“popup”); const iframe = document.getElementById(“gumroadIframe”); const close = document.querySelector(“.close”); const buttons = document.querySelectorAll(“.checkoutButton”); buttons.forEach(function(button) { button.addEventListener(“click”, function() { const gumroadCheckoutUrl = this.getAttribute(“data-url”); iframe.src = gumroadCheckoutUrl; popup.style.display = “block”; }); }); close.addEventListener(“click”, function() { popup.style.display…Continue reading