Skip to content

Instantly share code, notes, and snippets.

View wooxperto's full-sized avatar

WooXperto wooxperto

View GitHub Profile
@wooxperto
wooxperto / display-grid-of-related-product-categories-in-woocommerce.php
Last active August 3, 2023 09:09
Display grid of related product categories at single product page in WooCommerce
@wooxperto
wooxperto / set-min-max-step-product-qty-on-single-product.php
Created August 4, 2023 09:08
Set Min, Max & Step Product quantity at single product page and cart page on WooCommerce
<?php
/*
* @snippet Min, Max, Increment & Default Value Quantity | WooCommerce
* @author WooXperto
* @date 04.08.2023
*/
add_filter( 'woocommerce_quantity_input_args', 'wooxperto_r_woocommerce_quantity_changes', 6666, 2 );
function wooxperto_r_woocommerce_quantity_changes( $args, $product ) {
@wooxperto
wooxperto / set-min-max-step-qty-variable-product.php
Created August 4, 2023 09:11
Set min max and step product quantity at variable product single variation
<?php
/**
* @snippet Min, Max, Increment & Default Value Quantity | WooCommerce
* @author WooXperto
* @date 04.08.2023
*/
/* Set min max & Step Product quanity for variation product*/
add_filter( 'woocommerce_available_variation', 'wooxperto_woocommerce_quantity_min_variation', 5555, 3 );
@wooxperto
wooxperto / display-advance-custom-filed-at-single-product.php
Created August 8, 2023 06:24
Display advance custom field at WooCommerce single product
<?php
/**
* @snippet Display advance custom field at single product | WooCommerce
* @author WooXperto
* @date 08.08.2023
*/
if( !function_exists("wooXperto_display_acf_custom_field_at_single_product")){
@wooxperto
wooxperto / continue-shopping-button.php
Created August 10, 2023 05:44
Add a continue shopping button at single product page on WooCommerce.
<?php
/**
* @snippet Add a continue shopping button at single proudct page | WooCommerce
* @author WooXperto
* @date 10.08.2023
*/
add_action( 'woocommerce_single_product_summary', 'WooXperto_continue_shopping_button', 31 );
@wooxperto
wooxperto / hide-sku-at-single-product.php
Last active August 16, 2023 10:03
Hide SKU at single product page for normal user and only admin can see the prouduct SKU.
<?php
/**
* @snippet Add a continue shopping button at single proudct page | WooCommerce
* @author WooXperto
* @date 10.08.2023
*/
if( !function_exists("wooXperto_hide_sku_for_normal_users")){
@wooxperto
wooxperto / display-content-before-add-to-cart-button.php
Last active August 16, 2023 06:39
Display content avobe add to cart button at single product page.
<?php
/**
* @snippet Display content before add to cart button at single proudct page | WooCommerce
* @author WooXperto
* @date 10.08.2023
*/
add_action( 'woocommerce_before_add_to_cart_button', 'wooXperto_show_content_before_add_to_cart_button', 20 );
@wooxperto
wooxperto / change-related-product-number.php
Created August 16, 2023 06:47
How to change related product easily in WooCommerce on single product page.
@wooxperto
wooxperto / hide-price-and-add-to-cart-button.php
Created August 16, 2023 10:52
Hide price and add to cart button on the Shop and the single product page for the guest users.
<?php
/**
* @snippet Hide price& Add to cart button on shop and single product page | WooCommerce
* @author WooXperto
* @date 16.08.2023
*/
if( !function_exists("wooXperto_hide_price_addcart_not_logged_in")){
@wooxperto
wooxperto / hide-view-cart-button-from-mini-cart.php
Created August 16, 2023 12:45
Hide View Cart button form Mini-Cart on WooCommerce
<?php
/**
* @snippet Hide View Cart button from Mini-cart | WooCommerce
* @author WooXperto
* @date 16.08.2023
*/
add_action( 'woocommerce_widget_shopping_cart_buttons', 'wooXperto_remove_view_cart_minicart', 1 );