Skip to content

Instantly share code, notes, and snippets.

View robin-scott's full-sized avatar
🏠
Working from home

Rob Scott robin-scott

🏠
Working from home
View GitHub Profile
@robin-scott
robin-scott / style.css
Last active November 29, 2017 10:59
Remove box around links in Storefront
a:focus,
.focus a {
outline: none !important;
}
//Add a checkout padlock and alternative message in the Pay Now button - by Robin Scott of Silicon Dales
add_filter( 'woocommerce_order_button_text', 'sd_custom_order_button_text' );
function sd_custom_order_button_text() {
return __( 'Checkout Securely 🔒', 'woocommerce' );
}
@robin-scott
robin-scott / gist:341922bc2cdfd4c734618e71cb471b88
Created August 31, 2017 21:38
WooCommerce Gateway Stripe Icon Remover
// Rob Scott makes the icon for diners and jcb disappear pfft like magic
function rs_removed_icon( $icons ) {
$icons = str_replace( '<img src="[your absolute url to...]/assets/images/icons/credit-cards/jcb.svg" alt="JCB" width="32" style="margin-left: 0.3em" />', '', $icons );
$icons = str_replace( '<img src="[your absolute url to...]/assets/images/icons/credit-cards/diners.svg" alt="Diners" width="32" style="margin-left: 0.3em" />', '', $icons );
return $icons;
}
add_filter( 'woocommerce_gateway_icon', 'rs_removed_icon');
@robin-scott
robin-scott / custom-my-account-endpoint.php
Created May 2, 2016 22:54 — forked from claudiosanches/custom-my-account-endpoint.php
Example of custom My Account endpoint.
<?php
class My_Custom_My_Account_Endpoint {
/**
* Custom endpoint name.
*
* @var string
*/
public static $endpoint = 'my-custom-endpoint';
@robin-scott
robin-scott / my-account.php
Last active May 2, 2016 22:38 — forked from mclanecreative/my-account.php
Adds Tabs to WooCommerce "My Account" page. Instructions: add my-account.php to your /woocommerce/myaccount/ folder. Next, add the CSS to your child theme's style.css file. 11/25/2015 - Added tab6 for Event Espresso WP User Integration. Next challenge is to include Sensei My Courses & Pippin's AffiliateWP on these tabs.
<?php
/**
* My Account page
*
* @author WooThemes
* @edited by McLane Creative
* @package WooCommerce/Templates
* @version 3.1.0
*/