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( 'perfmatters_rest_api_exceptions', function( $exceptions ) { | |
| $exceptions[] = 'wbte-ewb'; | |
| return $exceptions; | |
| } ); |
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
| { | |
| "mcpServers": { | |
| "webtoffee-ai": { | |
| "command": "npx", | |
| "args": ["-y", "@automattic/mcp-wordpress-remote@latest"], | |
| "env": { | |
| "WP_API_URL": "https://yoursite.example/wp-json/mcp/mcp-adapter-default-server", | |
| "WP_API_USERNAME": "{admin_user}", | |
| "WP_API_PASSWORD": "{application-password}" | |
| } |
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 | |
| // Show Eu withdrawal footer link only in EU countries. | |
| add_filter( 'wbte_ewb_show_footer_withdrawal_link', function ( $show, $country ) { | |
| $eu_countries = array( 'AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE' ); | |
| return $show && in_array( $country, $eu_countries, true ); | |
| }, 10, 2 ); | |
| // To Render Eu withdrawal button shortcode [wt_eu_order_withdrawal] only in EU countries. | |
| add_filter( 'wbte_ewb_show_withdrawal_button_shortcode', function ( $show, $country ) { | |
| $eu_countries = array( 'AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE' ); |
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_batch_product_export_row_data_facebook', 'wt_fix_facebook_video_field', 10, 2 ); | |
| function wt_fix_facebook_video_field( $row, $product ) { | |
| // Only run if the feed actually has a 'video' column mapped | |
| if ( ! array_key_exists( 'video', $row ) ) { | |
| return $row; | |
| } |
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 | |
| /** | |
| * Show withdrawal shortcode in footer for EU customers only. | |
| */ | |
| add_action( 'wp_footer', function () { | |
| if ( is_admin() || ! function_exists( 'WC' ) ) { | |
| return; | |
| } | |
| if ( is_user_logged_in() ) { |
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_woocommerce_product_import_image_separator',function(){ return ',';}); |
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 |
NewerOlder