Skip to content

Instantly share code, notes, and snippets.

View PluginRepublicSupport's full-sized avatar

PluginRepublicSupport

View GitHub Profile
@PluginRepublicSupport
PluginRepublicSupport / disable_add_to_cart.php
Created January 24, 2023 13:36
Disable add-to-cart on WooCommerce shop/archive page
<?php
/**
* Disable the add to cart action
*/
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
/**
* Redirect to product page
@PluginRepublicSupport
PluginRepublicSupport / woo_cart.php
Created January 24, 2023 14:24
WooCommerce Cart
<?php
/**
* Cart Page
*
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
@PluginRepublicSupport
PluginRepublicSupport / image_size.css
Created January 24, 2023 15:24
Elementor Lightbox Fullwidth
/** Increase image size in lightbox **/
.dialog-type-lightbox .dialog-widget-content{
width: 100%;
}
@PluginRepublicSupport
PluginRepublicSupport / child_products_acf.php
Last active January 27, 2023 15:50
ACF Fields in Child Products
<?php
/**
*Snippet to add show ACF field content in child product
*/
function acf_filter_field($title, $child_product) {
return sprintf('<h4>%s</h4><p>%s</p>',
$title,
get_field('alcool', $child_product->get_ID()) /** Alcohol is the ACF field name **/
);
@PluginRepublicSupport
PluginRepublicSupport / flex_image_swatch.css
Created January 25, 2023 15:17
Display issue when columns are set to 3 with 5 elements
.pewc-preset-style .pewc-radio-images-wrapper, .pewc-preset-style .pewc-checkboxes-images-wrapper {
-webkit-justify-content: flex-start;
justify-content: flex-start;
}
.pewc-radio-images-wrapper.pewc-columns-3 .pewc-radio-image-wrapper{
margin: 1%;
}
.pewc-radio-images-wrapper.pewc-columns-2 .pewc-radio-image-wrapper{
@PluginRepublicSupport
PluginRepublicSupport / image_swatch_border_m.css
Created January 26, 2023 14:08
Image Swatch Mobile Checked/Hover Border
@media (max-width: 600px) {
.pewc-preset-style .pewc-radio-image-wrapper, .pewc-preset-style .pewc-checkbox-image-wrapper{
border: none;
}
.pewc-preset-style .pewc-radio-image-wrapper.checked, .pewc-preset-style .pewc-radio-image-wrapper:not(.pewc-checkbox-disabled):hover, .pewc-preset-style .pewc-checkbox-image-wrapper.checked, .pewc-preset-style .child-product-wrapper:not(.pewc-column-wrapper) .pewc-checkbox-image-wrapper:not(.pewc-checkbox-disabled):hover{
border: none;
}
.pewc-radio-image-wrapper label img, .pewc-checkbox-image-wrapper label img {
border: 3px solid #EEE;
min-height: 200px;
@PluginRepublicSupport
PluginRepublicSupport / img_swatch_title.css
Created January 30, 2023 13:06
Image Swatch Title/Description
@media only screen and (min-width: 600px) {
.pewc-radio-image-desc {
font-weight: 400;
font-size: 11px;
overflow-wrap: break-word;
line-height: 13px;
}
}
.pewc-preset-style .pewc-radio-image-wrapper, .pewc-preset-style .pewc-checkbox-image-wrapper {
padding: 0.1em;
/** Two columns for radio buttons on desktop view **/
@media only screen and (min-width: 600px) {
.pewc_group_7974_7987 ul.pewc-checkbox-group-wrapper{
display: grid;
grid-auto-columns: 200px 200px;
grid-template-rows: repeat(8, 30px);
gap: 10px;
grid-auto-flow: column;
}
@PluginRepublicSupport
PluginRepublicSupport / tabs_background_color.css
Created January 31, 2023 13:28
Inactive Tabs Background Color
/** Tabs background color **/
.pewc-preset-style .pewc-tabs-wrapper .pewc-tab {
background: #fff;
}
@PluginRepublicSupport
PluginRepublicSupport / custom_attr_child_product.php
Created January 31, 2023 14:01
Custom Attributes WooCommerce Child Product
<?php
/**
* Show custom attributes in child product
*/
/**
*Snippet to add show ACF field content in child product
*/