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
@media only screen and (max-width: 768px) { | |
.homepage-banner { | |
display: block; | |
} | |
} |
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
public function validate_api_key_field( $key, $value ) { | |
if ( isset( $value ) && 20 < strlen( $value ) ) { | |
WC_Admin_Settings::add_error( esc_html__( 'Looks like you made a mistake with the API Key field. Make sure it isn't longer than 20 characters', 'woocommerce-integration-demo' ) ); | |
} | |
return $value; | |
} |
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( 'wc_pip_after_body', 'add_shipping_addresses_to_pip', 10, 4 ); | |
function add_shipping_addresses_to_pip( $type, $action, $document, $order ) { | |
global $wcms; | |
if ( 'invoice' == $type ) { | |
$wcms->order->display_order_shipping_addresses($order); | |
} | |
} |
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 wtd_remove_var_subscriptions_price() { | |
return ''; | |
} | |
add_filter( 'woocommerce_variable_subscription_price_html', 'wtd_remove_var_subscriptions_price' ); |
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 wtd_subscriptions_custom_price_string( $pricestring ) { | |
$newprice = str_replace( 'for 1 day', 'once', $pricestring ); | |
return $newprice; | |
} | |
add_filter( 'woocommerce_subscriptions_product_price_string', 'wtd_subscriptions_custom_price_string' ); | |
function lr_subscriptions_custom_price_string( $pricestring ) { | |
$newprice = str_replace( 'every day once', 'once', $pricestring ); | |
return $newprice; | |
} |
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
/** | |
* // Custom redirect for users after clicking 'return to shop' | |
**/ | |
add_filter('woocommerce_return_to_shop_redirect', 'lr_wc_return_to_shop_redirect'); | |
function lr_wc_return_to_shop_redirect( $redirect ) { | |
$redirect = '/products/donation/'; | |
return $redirect; | |
} |
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_stripe_payment_icons', 'change_my_icons' ); | |
function change_my_icons( $icons ) { | |
// var_dump( $icons ); to show all possible icons to change. | |
$icons['visa'] = '<img src="https://mysite.com/wp-content/plugins/woocommerce/assets/images/icons/credit-cards/visa.svg" />'; | |
return $icons; | |
} |
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_stripe_payment_icons', 'change_my_icons' ); | |
function change_my_icons( $icons ) { | |
// var_dump( $icons ); to show all possible icons to change. | |
$icons['visa'] = '<img src="http://woocommerce-ext.reh/wp-content/plugins/woocommerce/assets/images/icons/credit-cards/visa.svg" />'; | |
$icons['mastercard'] = '<img src="http://woocommerce-ext.reh/wp-content/plugins/woocommerce/assets/images/icons/credit-cards/mastercard.svg" />'; | |
$icons['amex'] = '<img src="http://woocommerce-ext.reh/wp-content/plugins/woocommerce/assets/images/icons/credit-cards/amex.svg" />'; | |
return $icons; | |
} |
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( 'template_redirect', 'wc_custom_redirect_after_purchase' ); | |
function wc_custom_redirect_after_purchase() { | |
global $wp; | |
if ( is_checkout() && ! empty( $wp->query_vars['order-received'] ) ) { | |
wp_redirect( 'http://www.yoururl.com/your-page/' ); | |
exit; | |
} | |
} |
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 to remove the variable subscription price string | |
* Add this to your child theme's functions.php file. | |
*/ | |
function wc_remove_var_subscriptions_price() { | |
return ''; | |
} | |
add_filter( 'woocommerce_variable_subscription_price_html', 'wc_remove_var_subscriptions_price' ); | |
OlderNewer