Skip to content

Instantly share code, notes, and snippets.

Beka Rice bekarice

Block or report user

Report or block bekarice

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bekarice
bekarice / user-switching-notice-for-wc.php
Created Feb 12, 2019
Uses the "demo store" notice to show a switch back link for WC customer accounts with User Switching: http://cloud.skyver.ge/c50cbcd4c5e7
View user-switching-notice-for-wc.php
<?php
/**
* Plugin Name: User Switching Notice for WooCommerce
* Plugin URI: https://gist.github.com/bekarice/7785293fb60d7d5297a245b1c1271272
* Description: Adds a frontend notice to switch back to your user on WooCommerce sites with User Switching.
* Author: SkyVerge
* Author URI: http://www.skyverge.com/
* Version: 1.0.0
* Text Domain: user-switching-notice-for-woocommerce
*
View wc-order-email-thankyou-link.php
View wc-admin-view-thankyou-link.php
@bekarice
bekarice / yoast-seo-with-coauthors-plus.php
Created Apr 19, 2018
Forces Yoast to use the display name directly for the queried object so the proper coauthor name is used as the page title.
View yoast-seo-with-coauthors-plus.php
<?php // only copy if needed!
/**
* Fixes page titles for co-author archives.
*
* @param string[] $replacement Yoast title settings replacement data
* @return string[] updated data
*/
function br_fix_author_archive_title( $replacement ) {
@bekarice
bekarice / filter-wc-orders-by-gateway.php
Last active Nov 6, 2019
Filters WooCommerce Orders by Payment Gateway Used
View filter-wc-orders-by-gateway.php
<?php
/**
* Plugin Name: Filter WooCommerce Orders by Payment Method
* Plugin URI: http://skyverge.com/
* Description: Filters WooCommerce orders by the payment method used :)
* Author: SkyVerge
* Author URI: http://www.skyverge.com/
* Version: 1.0.0
* Text Domain: wc-filter-orders-by-payment
*
@bekarice
bekarice / sv-background-test.php
Created Jun 21, 2017
Provides a plugin to test whether a server will allow background job processing or not for WooComm import / export plugins.
View sv-background-test.php
<?php
/**
* Plugin Name: Background Processing Test for Import / Export
* Plugin URI: http://skyverge.com/
* Description: Tests whether or not the server can connect to itself to process jobs asynchronously.
* Author: SkyVerge
* Author URI: http://www.skyverge.com/
* Version: 1.0.0
* Text Domain: sv-background
*
@bekarice
bekarice / wc-hold-cod-orders.php
Created Apr 19, 2017
Force COD orders to 'on hold'
View wc-hold-cod-orders.php
<?php // only copy if needed
/**
* Forces orders be marked as "on hold
*/
function sv_wc_cod_order_status( $status ) {
return 'on-hold';
}
add_filter( 'woocommerce_cod_process_payment_order_status', 'sv_wc_cod_order_status', 15 );
@bekarice
bekarice / prefix-wc-order-number.php
Created Apr 10, 2017
Add WooCommerce Order number prefix
View prefix-wc-order-number.php
<?php // only copy if needed
/**
* Adds a prefix to the existing WooCommerce order number.
*
* @param int $order_id the order ID
* @param \WC_Order $order the order object
* @return string the updated order number
*/
function sv_wc_add_order_number_prefix( $order_id, $order ) {
View update-woocommerce-coupon-label.php
<?php // Don't copy me unless you need to!
/**
* Changes the coupon label output from Coupon: {code} to Coupon: {description}
*
* @param string $label the cart / checkout label
* @param \WC_Coupon $coupon coupon object
* @return string updated label
*/
function swwp_change_coupon_preview( $label, $coupon ) {
View move-wc-related-items-to-product-tab.php
You can’t perform that action at this time.