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 | |
/** | |
* Display short descriptions in loop | |
*/ | |
function kia_display_short_desciption_in_loop() { | |
global $product; | |
$short_description = $product->get_short_description(); | |
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: Local Dev modifications | |
* Plugin URI: https://kathyisawesome.com/ | |
* Description: Custom snippets for local development | |
* Version: 1.0.0 | |
* Author: Kathy Darling | |
* Author URI: https://kathyisawesome.com | |
*/ |
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: WooCommerce Mix and Match - PluginHive UPS Bridge | |
* Plugin URI: http://www.woocommerce.com/products/woocommerce-mix-and-match-products/ | |
* Description: Add support for Mix and Match products to UPS shipping. | |
* Version: 1.0.0 | |
* Author: Kathy Darling | |
* Author URI: http://kathyisawesome.com/ | |
* WC requires at least: 4.0.0 | |
* WC tested up to: 4.4.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: Mix and Match external product parents | |
* Plugin URI: https://gist.github.com/helgatheviking/af72435b3cf729886b852c61c0f2d38c | |
* Description: Fix add to cart URL/text for external products that don't have an external URL. Like when using a product table to group products together. | |
* Version: 1.0.0 | |
* Author: Kathy Darling | |
* Author URI: https://kathyisawesome.com | |
* Text Domain: mnm-external-parent | |
* Domain Path: /i18n/languages/ |
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
/** | |
* Disable contents switching for window prior to renewal | |
* | |
* @param boolean $can | |
* @param WC_Order_Item $item | |
* @param WC_Subscription $subscription | |
* @return boolean | |
*/ | |
public static function kia_prevent_modification_of_subscription( $can, $item, $subscription ) { |
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
curl -X POST https://example.com/wp-json/wc/v3/products \ | |
-u consumer_key:consumer_secret \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"name": "Sample Six Pack", | |
"type": "mix-and-match", | |
"regular_price": "0", | |
"description": "So many products to choose from.", | |
"short_description": "Pick 6.", | |
"categories": [ |
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 | |
/** | |
* Attributes shortcode callback. | |
*/ | |
function so_39394127_attributes_shortcode( $atts ) { | |
global $product; | |
if( ! is_object( $product ) || ! $product->has_attributes() ){ |
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
.xdebug-var-dump { | |
/* These are technically the same, but use both */ | |
overflow-wrap: break-word; | |
word-wrap: break-word; | |
-ms-word-break: break-all; | |
/* This is the dangerous one in WebKit, as it breaks things wherever */ | |
word-break: break-all; | |
/* Instead use this non-standard one: */ |
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 | |
/** | |
* @package KIA Subtitle | |
* @category Compatibility Class | |
* @version 3.1.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly |