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_filter( 'logout_url', 'custom_logout_url' ); | |
function custom_logout_url( $default ) | |
{ | |
return add_query_arg('redirect_to', get_bloginfo('url'),$default); | |
} | |
?> |
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
add_filter( 'woocommerce_checkout_fields', 'webendev_woocommerce_checkout_fields' ); | |
/** | |
* Change Order Notes Placeholder Text - WooCommerce | |
* | |
*/ | |
function webendev_woocommerce_checkout_fields( $fields ) { | |
$fields['order']['order_comments']['placeholder'] = 'Your custom placeholder'; | |
return $fields; | |
} |
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
add_action( 'storefront_header', 'jk_primary_navigation_wrapper', 45 ); | |
add_action( 'storefront_header', 'jk_primary_navigation_wrapper_close', 65 ); | |
function jk_primary_navigation_wrapper() { | |
echo '<section class="jk-primary-navigation">'; | |
} | |
function jk_primary_navigation_wrapper_close() { | |
echo '</section>'; | |
} |
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 | |
// only copy the opening php tag if needed | |
// Change the shop / product prices if a unit_price is set | |
function sv_change_product_html( $price_html, $product ) { | |
$unit_price = get_post_meta( $product->id, 'unit_price', true ); | |
if ( ! empty( $unit_price ) ) { | |
$price_html = '<span class="amount">' . wc_price( $unit_price ) . ' per kg</span>'; | |
} |