This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Filter bump locations | |
| */ | |
| function demo_multiple_bumps() { | |
| return array( 'product', 'checkout' ); | |
| } | |
| add_filter( 'wcob_bump_location', 'demo_multiple_bumps' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Enable shipping fields at checkout for booking products | |
| */ | |
| add_filter( 'woocommerce_cart_needs_shipping_address', '__return_true' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @media screen and (max-width: 999px) { | |
| .pewc-swatch-grid .pewc-radio-images-wrapper.pewc-columns-3, | |
| .pewc-swatch-grid .pewc-checkboxes-images-wrapper.pewc-columns-3 { | |
| grid-template-columns: 1fr 1fr !important; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Don't apply discount to add-on fields | |
| */ | |
| add_filter( 'pewc_disable_wcfad_on_addons', '__return_true' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Always display the quantity field | |
| add_filter( 'pewc_hide_quantity', '__return_false' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Add a CSS class to products on archive pages if they have add-on fields. | |
| */ | |
| function demo_add_has_addons_class( $classes ) { | |
| if ( is_archive() || is_shop() ) { | |
| global $product; | |
| if ( $product && 'yes' === pewc_has_product_extra_groups( $product->get_id() ) ) { | |
| $classes[] = 'pewc-has-addons'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Ensure user can't order more parent products than child product stock allows | |
| * Only applies to child product with 'Linked' quantities | |
| */ | |
| <?php | |
| /** | |
| * Ensure user can't order more parent products than child product stock allows | |
| * Only applies to child product with 'Linked' quantities | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Filter Text Preview classes for Divi and nswiper gallery | |
| */ | |
| add_filter( 'apaou_gallery_container', function() { | |
| return 'images'; | |
| } ); | |
| add_filter( 'apaou_layer_parent', function() { | |
| return 'nswiper-wrapper'; | |
| } ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Update variation taxonomies after WP All Import import completes | |
| */ | |
| function demo_after_xml_import( $import_id, $import ) { | |
| if( function_exists( 'wcbvp_update_all_variations' ) ) { | |
| wcbvp_update_all_variations(); | |
| } | |
| } | |
| add_action( 'pmxi_after_xml_import', 'demo_after_xml_import', 10, 2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Change variation image in Products field Column layout | |
| */ | |
| add_filter( 'pewc_column_layout_replace_thumbnail', '__return_true' ); |
NewerOlder