Category: eCommerce
Test update snippet
test asdasdasdasd updatedContinue reading
Exclude Specific Products from Parent Category
/** * Exclude specific products from appearing in their parent category. */ add_action(‘woocommerce_product_query’, ‘exclude_specific_products_from_parent_category’); function exclude_specific_products_from_parent_category($q) { // Only apply this on the parent category archive page if (!is_product_category(‘telt-og-pavilloner’)) { // Replace with your parent category slug return; } //…Continue reading
[No Longer Required] Enable Additional Order Dynamic Data Endpoints for RD Theme Woo Order Received Page
function rd_get_valid_received_order() { static $order = null; static $checked = false; if ( $checked ) { return $order; } $checked = true; if ( ! function_exists( ‘wc_get_order’ ) ) { return null; } global $wp; if ( empty( $wp )…Continue reading
Hide RD Theme Woo Additional Order Info Wrapping Column when No Additional Order Info Present
(function () { function rdToggleAdditionalOrderInfoColumn() { var container = document.getElementById(‘rd-additional-order-info’); if (!container) { return; } if (!container.querySelector(‘.awb-woo-order-additional-info’)) { container.style.display = ‘none’; } } if (document.readyState === ‘loading’) { document.addEventListener(‘DOMContentLoaded’, rdToggleAdditionalOrderInfoColumn); } else { rdToggleAdditionalOrderInfoColumn(); } })();Continue reading
Add a button to customer data
add_action( ‘woocommerce_admin_order_data_after_billing_address’, ‘custom_customer_history_search_button_blue’, 10, 1 ); function custom_customer_history_search_button_blue( $order ) { // Vásárló e-mail címének lekérése $customer_email = $order->get_billing_email(); if ( $customer_email ) { // A keresési URL összeállítása $search_url = admin_url( ‘edit.php?s=’ . urlencode( $customer_email ) . ‘&post_type=shop_order’ );…Continue reading
Untitled Snippet
Remove the “Apply to become a vendor” checkbox from the WooCommerce default customer signup form
/** * Remove WC Vendors “Apply to become a vendor” checkbox from the WooCommerce default customer signup form. */ add_action( ‘init’, ‘wcv_remove_vendor_registration_checkbox’, 99 ); function wcv_remove_vendor_registration_checkbox() { global $wp_filter; $hook = ‘woocommerce_register_form’; if ( isset( $wp_filter[ $hook ] ) )…Continue reading
Untitled Snippet
document.addEventListener(“click”, (e) => { const pill = e.target.closest(“.rs-pill”); if (!pill) return; const row = pill.parentElement; row.querySelectorAll(“.rs-pill”).forEach(p => p.classList.remove(“active”)); pill.classList.add(“active”); });Continue reading