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
| .wcc-cookie-settings-link { | |
| display: inline-block; | |
| font-size: 14px; | |
| color: #0073aa; /* Adjust to match your brand color */ | |
| text-decoration: underline; | |
| cursor: pointer; | |
| margin-top: 10px; | |
| } | |
| .wcc-cookie-settings-link:hover { | |
| color: #005177; /* Darker shade for hover state */ |
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
| <a href="#" class="wcc-cookie-settings-link" onclick="document.querySelector('.wcc-btn-revisit').click(); return false;"> | |
| Cookie Settings | |
| </a> |
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
| document.addEventListener("wcc_consent_update", function (eventData) { | |
| const categories = eventData.detail.categories; | |
| const accepted = categories && categories.accepted; | |
| document.querySelectorAll('iframe[data-src*="youtube.com"]').forEach(function (iframe) { | |
| if (accepted && accepted.includes('marketing')) { | |
| iframe.src = iframe.getAttribute('data-src'); | |
| } else { | |
| iframe.removeAttribute('src'); | |
| } |
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
| document.addEventListener("_wccBannerVisible", function (event) { | |
| const consentData = getWccConsent(); | |
| // Check stored analytics consent | |
| if (consentData.categories.analytics === true) { | |
| console.log("Analytics consent is YES (true)."); | |
| // Load analytics scripts | |
| } else { | |
| console.log("Analytics consent is NO (false)."); | |
| // Do not load analytics scripts |
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
| document.addEventListener("wcc_consent_update", function (eventData) { | |
| const categories = eventData.detail.categories; | |
| // Check if the analytics category was accepted | |
| if (categories && categories.accepted && categories.accepted.includes('analytics')) { | |
| console.log('Analytics consent: GRANTED'); | |
| // Initialize your analytics script here | |
| } else { | |
| console.log('Analytics consent: DENIED'); | |
| // Suppress or remove your analytics script here |
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 // Do not copy this line of code | |
| /** | |
| * Re-enable WooCommerce order total recalculation during WT Import Export order import. | |
| * | |
| * This ensures WooCommerce rebuilds the internal tax and totals structure | |
| * for imported orders so that third-party invoice and reporting plugins | |
| * display the correct tax labels and subtotal values. | |
| * | |
| * @param WC_Order $order The order object being prepared for insertion. | |
| * @param array $data Raw import data. |
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 //Do not copy this line of code | |
| add_filter( 'wt_smart_coupon_meta_data', function ( $coupon_data, $coupon ) { | |
| $coupon_id = isset( $coupon_data['coupon_id'] ) ? (int) $coupon_data['coupon_id'] : 0; | |
| if ( ! $coupon_id || ! is_a( $coupon, 'WC_Coupon' ) ) { | |
| return $coupon_data; | |
| } | |
| if ( 'wbte_sc_bogo' === $coupon->get_discount_type() ) { | |
| $coupon_data['coupon_type'] = __( 'Redeem Now', 'wt-smart-coupons-for-woocommerce' ); | |
| } | |
| return $coupon_data; |
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 //Do not copy this line of code | |
| //Change the country code to target the appropriate country | |
| add_filter('wcc_ccpa_allowed_regions',array('CA','CO')); |
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 //Do not copy this line of code | |
| add_filter( 'wt_feed_facebook_product_checkout_link', 'wbfte_product_feed_change_checkout_url', 10, 2 ); | |
| /** | |
| * Modify the checkout URL for Facebook product feeds. | |
| * | |
| * @param string $checkout_url The original checkout URL. | |
| * @param WC_Product $product The product object. | |
| * | |
| * @return string Modified checkout URL. | |
| */ |
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 //Do not copy this line of code | |
| add_filter('wishlist_table_heading','wbte_gc_change_wishlist_title_description',10,1); | |
| function wbte_gc_change_wishlist_title_description($title){ | |
| return 'Products added to favourites'; //add your custom title here. | |
| } |
NewerOlder