This file contains 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
add_filter( 'woocommerce_product_cross_sells_products_heading', 'na_change_cross_sells_products_heading' ); | |
function na_change_cross_sells_products_heading() { | |
return 'You will definitely like'; | |
} |
This file contains 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 | |
function na_filter_events_desc( $description ) { | |
if( tribe_context()->get( 'view_request' ) === 'default' ) { | |
$description = 'Your description here.'; | |
} elseif( tribe_context()->get( 'view_request' ) === 'list' ) { | |
$description = 'Your description here.'; | |
} elseif( tribe_context()->get( 'view_request' ) === 'day' ) { | |
$description = 'Your description here.'; | |
} elseif( tribe_context()->get( 'view_request' ) === 'map' ) { |
This file contains 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
function na_woo_free_shipping_notice() { | |
if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { // Check whether Woo is active | |
$location = WC_Geolocation::geolocate_ip(); // Get location data via MaxMind Geolocation | |
$country = $location['country']; // Get the country from MaxMind data | |
switch ( $country ) { // Check what the country is | |
case "BE": // If it's Belgium... | |
$min_amount = 100; /// ...then apply this amount... | |
break; | |
case "DE": // ...etc. | |
$min_amount = 150; |
This file contains 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
// Create the function and pass the variable | |
function my_conditional_logo( $logo_container ) { | |
// Create a conditional statement to target specific page IDs | |
if( is_page( array( 1, 5, 9 ) { | |
// Create variable and set it to the path of the logo you'd like to display on these specific pages | |
$logo_url = '/wp-content/uploads/2021/07/my_logo_alt.svg'; | |
// If the conditional statement is false, use the default |
This file contains 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 | |
// Determines what to do - creates the function with your function name | |
function add_note_to_product() { | |
// Checks whether the product is in the Hoodies product category | |
if ( has_term('hoodies', 'product_cat' ) ) { | |
// Gets the note field | |
$note = get_field( 'note' ); |
This file contains 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
add_filter( 'wc_add_to_cart_message_html', '__return_false' ); |
This file contains 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
add_filter('woocommerce_add_to_cart_redirect', 'skip_cart'); | |
function skip_cart() { | |
global $woocommerce; | |
$checkout_url = wc_get_checkout_url(); | |
return $checkout_url; | |
} |
This file contains 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
.wpcf7-checkbox .wpcf7-list-item input[type=checkbox], | |
.wpcf7-radio .wpcf7-list-item input[type=radio] { | |
visibility: hidden; | |
margin: 0; | |
width: 0!important; | |
} | |
input[type=checkbox] + .wpcf7-list-item-label, | |
input[type=radio] + .wpcf7-list-item-label { | |
font-size: initial; | |
font-weight: initial; |
NewerOlder