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
/** | |
* Declare Features compatibility. | |
*/ | |
add_action( 'before_woocommerce_init', function() { | |
if ( ! class_exists( 'Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { | |
return; | |
} | |
// HPOS (Custom Order tables) compatibility. |
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
<?php | |
/** | |
* Plugin Name: Simple User Listing - Demo Avatars | |
* Description: Use Picsum.photos to generate some random random avatars. | |
* Author: helgatheviking | |
* Version: 1.0.0 | |
* Requires at least: 6.5 | |
*/ | |
defined( 'ABSPATH' ) || 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
const TYPES = { | |
FETCH_FROM_API : "FETCH_FROM_API", | |
HYDRATE_PRODUCT: "HYDRATE_PRODUCT", | |
}; | |
export default TYPES; |
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 BCC to certain store emails. | |
* | |
* @param string $headers | |
* @param string $email_id | |
* @return string | |
*/ | |
function kia_add_bcc_to_specific_emails( $headers, $email_id ) { | |
$bbc_these_emails = array( |
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 kia_translate_billing_details_when_free( $translated_text, $untranslated_text, $domain ) { | |
if ( function_exists( 'wc' ) && 'woocommerce' === $domain ) { | |
//make the changes to the text | |
switch( $untranslated_text ) { | |
case 'Billing details': | |
if ( ! WC()->cart->needs_shipping() && 0.0 === floatval( WC()->cart->get_total( 'edit' ) ) ) { | |
$translated_text = __( 'NOT billing details', 'kia_textdomain' ); |
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
<?php | |
/** | |
* Plugin Name: Clear persistent carts daily | |
* Plugin URI: https://gist.github.com/ | |
* Description: Schedule a task to run daily to delete WooCommerce persistent carts | |
* Version: 1.0.0 | |
* Author: Kathy Darling | |
* Author URI: http://kathyisawesome.com/ | |
* WC requires at least: 6.3.0 | |
* WC tested up to: 6.3.0 |
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
<?php | |
/** | |
* Plugin Name: Attributes shortcode | |
* Plugin URI: https://gist.github.com/helgatheviking/1d34f84fc93b8a08c258a37768802625 | |
* Description: Create a shortcode to display product attribute taxonomies | |
* Version: 6.8.0 | |
* Author: Kathy Darling | |
* Author URI: https://kathyisawesome.com/ | |
* | |
* Requires PHP: 7.4 |
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
<?php | |
/** | |
* Mix and Match Item Thumbnail | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/mnm/mnm-product-thumbnail.php. | |
* | |
* HOWEVER, on occasion WooCommerce Mix and Match will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
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
<?php | |
/** | |
* Give count unique donors | |
* | |
* @param array $atts [ | |
* 'form_id' => int The form ID to count donors for | |
* ] | |
*/ | |
function kia_give_donor_count( $atts ) { |
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 kia_unload_script() { | |
if ( function_exists( 'is_product' ) && is_product() ) { | |
wp_dequeue_script( 'wc-single-product' ); | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'kia_unload_script', 20 ); |
NewerOlder