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 my_text_strings( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'students' : | |
$translated_text = __( 'clients', 'woocommerce' ); | |
break; | |
case 'courses' : | |
$translated_text = __( 'programs', 'woocommerce' ); | |
break; | |
case 'teachers' : | |
$translated_text = __( 'counsellors', 'woocommerce' ); |
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_continue_shopping_redirect', 'wc_change_continue_shopping_redirect' ); | |
function wc_change_continue_shopping_redirect() { | |
return wc_get_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
add_filter( 'woocommerce_countries', 'rs_edit_zw_country' ); | |
function rs_edit_zw_country ( $countries ) { | |
$new_countries = array( | |
'ZW' => __( 'Zimbabwe', 'woocommerce' ), | |
); | |
return array_merge( $countries, $new_countries ); | |
} | |
add_filter( 'woocommerce_continents', 'rs_add_new_zw_country_to_continents' ); |
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_action( 'woocommerce_before_checkout_billing_form', 'rs_conditional_shipping_notice' ); | |
function rs_conditional_shipping_notice() { | |
echo '<div class="shipping-notice woocommerce-info" style="display:none">The x product is from supplier x and you can find it on this <a href="#"> link</a> </div>'; | |
} | |
add_action( 'woocommerce_after_checkout_form', 'rs_conditional_show_notice_shipping' ); | |
function rs_conditional_show_notice_shipping(){ | |
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_countries', 'rs_add_my_country' ); | |
function rs_add_my_country( $countries ) { | |
$new_countries = array( | |
'NIRE' => __( 'Northern Ireland', 'woocommerce' ), | |
'SCO' => __( 'Scotland', 'woocommerce' ), | |
'WAL' => __( 'Wales', 'woocommerce' ), | |
'ENG' => __( 'England', 'woocommerce' ), | |
); | |
return array_merge( $countries, $new_countries ); |
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
SELECT product.ID as product_id, product.post_title as product_name, replace(product.post_content, '"', "'") as product_content, product_sku.meta_value as product_sku, product_price.meta_value as product_price, product_weight.meta_value as product_weight FROM wp_posts as product LEFT JOIN wp_postmeta as product_sku ON product.ID = product_sku.post_ID LEFT JOIN wp_postmeta as product_price ON product.ID = product_price.post_ID LEFT JOIN wp_postmeta as product_weight ON product.ID = product_weight.post_ID WHERE (product.post_type = 'product' OR product.post_type = 'product_variation') AND product_sku.meta_key = '_sku' AND product_price.meta_key = '_price' AND product_weight.meta_key = '_weight' |