Skip to content

Instantly share code, notes, and snippets.

@DarkAllMan
DarkAllMan / kiyoh.php
Last active Oct 19, 2020
Kiyoh, Klantenvertellen create Invite on API
View kiyoh.php
<?php
// HELPER FUNCTION
public function endsWith( $haystack, $needle ) {
return $needle === "" || (substr($haystack, -strlen($needle)) === $needle);
}
public function create_kiyoh_invite($order_id, $this_status_transition_from, $this_status_transition_to, $instance){
$result=false;
$current_domain = 'yourdomain.com';
@DarkAllMan
DarkAllMan / class-ysm-search.php
Created Oct 5, 2017
Smart Woocommerce Search with Groups Compatibility
View class-ysm-search.php
<?php
/**
* Class Ysm_Search
* Retrieves posts from the database depending on settings
*/
class Ysm_Search
{
/**
@DarkAllMan
DarkAllMan / woocommerce-hide-empty-categories-shop.php
Last active Oct 6, 2020
Woocommerce Hide Empty Categories in Shop (compatible with hidden products and Woocommerce Groups)
View woocommerce-hide-empty-categories-shop.php
<?php
/**
Plugin Name: WooCommerce - Hide categories where no products are visible to user
Plugin URI: https://www.randall.nl
Description: Excludes categories with no visible products from the WooCommerce category overview in shop
Version: 0.1
Author: Randall Kam
Author URI: https://www.randall.nl
*/
@DarkAllMan
DarkAllMan / woocommerce-hide-empty-categores.php
Last active Sep 12, 2017 — forked from cklosowski/woocommerce-hide-empty-categores.php
In addition to Chris, I added functionality that child categories will only expand if they are in the selected category.
View woocommerce-hide-empty-categores.php
<?php
/**
Plugin Name: WooCommerce - Exclude empty categories from widget
Plugin URI: https://chrisk.io/woocommerce-hide-categories-with-no-visible-products-in-the-product-category-widget/
Description: Excludes categories with no visible products from the WooCommerce category list
Version: 0.2
Author: Chris Klosowski
Editor: Randall Kam
Author URI: https://chrisk.io
*/