Skip to content

Instantly share code, notes, and snippets.

View boghy933's full-sized avatar
💭
Hello :)

Alexandru Bogdan Bostan boghy933

💭
Hello :)
View GitHub Profile
@boghy933
boghy933 / factoryPatter.php
Created May 14, 2020 10:19
Factory Pattern
<?php
abstract class ProductCreator {
abstract public function factoryMethod(){}
}
class ConcreteCarPartCreator extends ProductCreator {
public function factoryMethod(){
return new ConcreteCarPart;
}
}
@boghy933
boghy933 / diable_wc_shipping_rates_cache.php
Last active September 19, 2018 10:54 — forked from chuckmo/diable_wc_shipping_rates_cache.php
Disable WooCommerce's Shipping Rates Cache
// essentially disable WooCommerce's shipping rates cache
add_action('woocommerce_checkout_update_order_review', 'clear_wc_shipping_rates_cache');
function clear_wc_shipping_rates_cache(){
$packages = WC()->cart->get_shipping_packages();
foreach ($packages as $key => $value) {
$shipping_session = "shipping_for_package_$key";
unset(WC()->session->$shipping_session);
@boghy933
boghy933 / april-theme-translate-footer.php
Last active April 17, 2018 13:02
Add WPML support to the footer in April theme by g5plus
@boghy933
boghy933 / .gitignore
Created September 12, 2017 13:41 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@boghy933
boghy933 / Atom keys
Created August 4, 2017 15:32
Atom keys
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
@boghy933
boghy933 / Atom style
Last active December 14, 2017 10:31
Atom style
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/