Category: eCommerce
Organization Schema
Untitled Snippet
{ “@context”: “https://schema.org”, “@type”: “Organization”, “name”: “Easily Moved Equipment”, “url”: “https://www.easilymovedequipment.com”, “logo”: “https://easilymovedequipment.com/wp-content/uploads/2023/03/EME-Logo-Update-01.png”, “sameAs”: [ “https://www.linkedin.com/company/easily-moved-equipment-inc-/”, “https://www.youtube.com/user/EasilyMovedEquipment/videos” ] }Continue reading
JSON-LD for 10 Tonne
JSON-LD for 11000R
Categorias pai a negrito e lembrete para nao esquecer de prencher certos campos ao adicionar um produto
/** * Validação completa para produtos WooCommerce * Verifica preço, categoria, referência (SKU) e peso */ function validar_produto_woocommerce_completo($post_id) { // Verifica se é um produto if (get_post_type($post_id) !== ‘product’) { return; } // Verifica se está salvando o produto (não…Continue reading
Add Wholesale Order Form Favourites Button Functionality To WooCommerce Single Product Pages
/** * Output scripts and styles for the favourites button in the head. */ function wwof_output_favourites_scripts() { // Only load on single product pages. if ( ! is_product() ) { return; } // Get current user ID. $user_id = get_current_user_id();…Continue reading
WooCommerce Delivery Address Popup – Sync Address in Header & Checkout
/* * Use the shortcode [deliver_to_address] wherever you want the address to appear (e.g., header, sidebar, pages). * Author: Muhammad Mubeen A (wp_expert28) * */ // Shortcode to display “Deliver to:” widget with address edit popup add_shortcode(‘deliver_to_address’, function () {…Continue reading
Remove field checkout WooCommerce
/** Remove all possible fields **/ function mrj_remove_checkout_fields( $fields ) { // Billing fields unset( $fields[‘billing’][‘billing_state’] ); unset( $fields[‘billing’][‘billing_company’] ); // Shipping fields unset( $fields[‘shipping’][‘shipping_state’] ); unset( $fields[‘shipping’][‘shipping_company’] ); return $fields; } add_filter( ‘woocommerce_checkout_fields’, ‘mrj_remove_checkout_fields’ );Continue reading
Restrict payment methods based on cart total
add_filter(‘woocommerce_available_payment_gateways’, ‘limit_payment_gateway_based_on_cart_total’); function limit_payment_gateway_based_on_cart_total($available_gateways) { if (is_admin() || !is_checkout()) { return $available_gateways; } // Get total cart $cart_total = WC()->cart->get_total(‘edit’); // Total cart without formattation // Set limit $limit = 1000; // Limit in local currency // If the total…Continue reading