Skip to content

Instantly share code, notes, and snippets.

View Preciousomonze's full-sized avatar
🤡
Coding on the bicycle 😎🚴🏽‍♂️

Precious Omonzejele Preciousomonze

🤡
Coding on the bicycle 😎🚴🏽‍♂️
View GitHub Profile
@seb86
seb86 / wc-rest-api-products-images.php
Created March 27, 2023 20:13
WooCommerce REST API (Products) - Get the images for a product or product variation and returns all image sizes.
<?php
if ( ! function_exists( 'wc_rest_get_product_images' ) ) {
add_filter( 'woocommerce_rest_prepare_product_object', 'wc_rest_get_product_images', 10, 2 );
/**
* Get the images for a product or product variation
* and returns all image sizes.
*
* @param WP_REST_Request $request Request object.
* @param WC_Product|WC_Product_Variation $product Product instance.
@daveloodts
daveloodts / gist:46a7e7bb67e3c01e2bcc23de728cfbff
Last active August 20, 2021 21:07
schema.org book for WooCommerce
<?php
// define the woocommerce_structured_data_product callback
function filter_woocommerce_structured_data_product( $markup, $product ) {
$formaat = get_field("boek_formaat");
$authors = get_field("boek_auteurs");
$date = get_the_date('Y m d');
$markup['additionalType'] = "book";
$markup['brand'] = "Ertsberg";
$markup['isbn'] = $product->get_sku();
@Preciousomonze
Preciousomonze / Readme.md
Last active June 12, 2024 09:15
Paid Membership Pro - How to get some functions you might not see in the documentation. happened to me a lot 😁

So I'll just try to be dumping some things here for docu purposes. Feel free to comment, if you have more to add. I'll try as much as possible to update.

Disclaimer: Please remember that we are all imperfect, and as such, some of the info here might be or outdated or incomplete, that's why we're a community. Any info you find incorrect, please do well to suggest the correct thing in the comment section, we're doing it for all of us. People powerrr

Note: That this also includes functions from their addons.

Format will be "Function name - Plugin name"

pmprorh_getProfileFields - Paid Membership Pro Registration Helper

Guess this helps get the fields from the profile.

@Preciousomonze
Preciousomonze / pekky-wc-stand-alone-force-sells-sorting.php
Last active November 9, 2020 23:50
WooCommerce Cart Stand-alone and Force Sells Custom Sorting - This MU-Plugin helps sort Predefined Products to behave a certain way when they're added or removed from the cart page. Requires WooCommerce to Work.
<?php
/**
* WooCommerce Cart Stand-alone and Force Sells Custom Sorting.
*
* @package pekky-wc-stand-alone-force-sells-sorting
* @author Precious Omonzejele (CodeXplorer 🤾🏽‍♂️🥞🦜🤡)
*
* @wordpress-plugin
* Plugin Name: WooCommerce Cart Stand-alone and Force Sells Custom Sorting
* Plugin URI: https://gist.github.com/Preciousomonze/f41ebbd43b751d00e86fa4207e88413f
@helgatheviking
helgatheviking / kia-local-dev.php
Created September 9, 2020 22:34
Snippet for local WordPress development
<?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
*/
@Preciousomonze
Preciousomonze / wc_pv_custom_filters.php
Last active October 25, 2023 11:15
Phone Validator Custom Filters and How to Use 📝
<?php
/**
* List of Phone Validator for WooCommerce custom Filters and how to use.
*
* Please feel free to add more to this, and don't forget to add your name to contributors, if you want to.
*
* @author Precious Omonzejele (CodeXplorer 🤾🏽‍♂️🥞🦜🤡)
* @contributors ...add name(s) here
*/
@bagerathan
bagerathan / woo-events.js
Last active October 28, 2024 06:19
[Woocommerce Javascript events] #woo
//Woocommerce Checkout JS events
$( document.body ).trigger( 'init_checkout' );
$( document.body ).trigger( 'payment_method_selected' );
$( document.body ).trigger( 'update_checkout' );
$( document.body ).trigger( 'updated_checkout' );
$( document.body ).trigger( 'checkout_error' );
//Woocommerce cart page JS events
$( document.body ).trigger( 'wc_cart_emptied' );
$( document.body ).trigger( 'update_checkout' );
@BrianHenryIE
BrianHenryIE / unhook_wordpress_closure.php
Last active November 24, 2021 23:07
Unhook a closure from a WordPress action by using the class the closure binds to to compare.
<?php
/**
* Unhook a closure from a WordPress action by using the class the closure binds to to compare.
*/
$action_name = 'admin_notices';
$priority = 10;
$expected_class = MyClass::class;
diff --git a/node_modules/react-native-google-places/ios/NSMutableDictionary+GMSPlace.h b/node_modules/react-native-google-places/ios/NSMutableDictionary+GMSPlace.h
index 8991707..4e517b7 100644
--- a/node_modules/react-native-google-places/ios/NSMutableDictionary+GMSPlace.h
+++ b/node_modules/react-native-google-places/ios/NSMutableDictionary+GMSPlace.h
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>
#import <GooglePlaces/GooglePlaces.h>
+#import <GoogleMapsBase/GoogleMapsBase.h>
@interface NSMutableDictionary (GMSPlace)
@helgatheviking
helgatheviking / wc-minimalize-checkout.php
Created December 12, 2019 15:12
Reduce WooCommerce checkout to the bare minimum
<?php
/**
* Plugin Name: WC Minimalize Checkout Settings
* Plugin URI: https://woocommerce.com/
* Description: Reduce checkout to the bare minimum.
* Version: 1.0.0
* Author: Kathy Darling
* Author URI: http://kathyisawesome.com/*
* Requires at least: 5.3.0
* Tested up to: 5.3.0