Skip to content

Instantly share code, notes, and snippets.

View rcstr's full-sized avatar
:shipit:
Engineering

Rommel Castro rcstr

:shipit:
Engineering
View GitHub Profile
@markjaquith
markjaquith / suicidal-filter.php
Last active October 22, 2023 23:14
Version of `add_filter()` for WordPress that only runs once
<?php
/*
Use this just like `add_filter()`, and then run something that calls the filter (like
`new WP_Query`, maybe).
That's it. If the filter gets called again, your callback will not be.
This works around the common "filter sandwich" pattern where you have to remember to
call `remove_filter` again after your call.
@berkedel
berkedel / flow-error-icu4c-not-loaded.md
Created April 4, 2018 14:13
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

How to solve dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

brew uninstall --ignore-dependencies node icu4c
brew install node
@jrick1229
jrick1229 / wcs_sub_active_SEPA.php
Last active December 3, 2021 14:49
Keep subscription active when order is paid for via SEPA. Works with parent and renewal orders.
<?php
/*
*
* Keep subscription active when order is paid for via SEPA.
* Works with parent and renewal orders.
*
*/
add_action( 'woocommerce_order_status_changed', 'wcs_sub_active_SEPA', 10, 4 );