Skip to content

Instantly share code, notes, and snippets.

View mehul0810's full-sized avatar
👋
Hello Folks. Thanks for visiting my GitHub profile

Mehul Gohil mehul0810

👋
Hello Folks. Thanks for visiting my GitHub profile
View GitHub Profile
@mehul0810
mehul0810 / simple-ticket-incrementor.php
Created July 23, 2020 09:39
Simple Ticket Incrementor - Supports Multi-Step Donation Forms
<?php
/**
* Plugin URI: https://givewp.com/
* Plugin Name: Custom GiveWP Simple Ticket Incrementer
* Description: A simple functionality plugin (not supported) to increment donation amounts based on a number input
* field. Ideal for simple ticket sales. This is provided as an example plugin, it is not officially supported by
* GiveWP.com in any way and we are not liable for how it impacts your site in any way.
* Version: 1.1.0
* Author: The impress.org team, dlocc
*
echo "Welcome to Create WordPress Site Wizard!"
echo -n "Enter Folder Name:"
read foldername
echo -n "Enter Site Name:"
read sitename
echo "Creating Site Folder"
mkdir ${foldername}
cd ${foldername}
<?php
function mg_update_remark( $remark, $formId ) {
// Do whatever you like to update the remark text.
$remark = 'This is my remark'; // This is just an example how to update remark text.
return $remark;
}
add_filter( 'mggi88_update_remark_text', 'mg_update_remark', 10, 2 );
<?php
function mg_update_product_description( $productDesc, $donationId ) {
// Do whatever you want to add using the Form Id or $_POST and update the product description and return it.
$purpose = give_get_meta( $donationId, 'purpose', true ); // `purpose` here is the name of the FFM field.
return $purpose;
}
add_filter( 'mggi88_update_product_description_text', 'mg_update_product_description', 10, 2 );
<?php
/**
* Plugin Name: My PaiementPro with GiveWP
*.Version: 1.0.0
* Author: Mehul Gohil
*/
/**
* Register payment method.
*
<?php
/**
* Pass custom field data to Stripe when payment is processed.
*
* Retrieves custom form field data from the $_POST variable and merges it into
* the array that is passed to Stripe when a payment is made. Custom field data
* can be found under Metadata in the Stripe payment details screen.
*
* @param array $charge_args Arguments passed to Stripe payment gateway.
*
<?php
function selfie_auction_disable_rocket_loader( $tag, $handle, $src ) {
if (
'jquery-ui-menu' === $handle ||
'jquery-ui-position' === $handle ||
'jquery-ui-core' === $handle ||
'jquery-ui-widget' === $handle ||
'jquery' === $handle
) {
$tag = str_replace( 'src=', 'data-cfasync="false" src=', $tag );
@mehul0810
mehul0810 / register-payment-method-for-give.php
Last active January 10, 2020 03:49
This Gist is used to register custom payment gateway for Give.
<?php
/**
* Register payment method.
*
* @since 1.0.0
*
* @param array $gateways List of registered gateways.
*
* @return array
*/
<script type="text/javascript">
jQuery( 'document' ).ready( function ($) {
$('#billing_postcode').on( 'focusout', function() {
$(this).trigger('update_checkout');
});
});
</script>
<?php
function mg_update_order_review_on_checkout( $post_data ) {
@mehul0810
mehul0810 / default-wordpress-blocks-sass.scss
Created January 23, 2019 10:46 — forked from davewarfel/default-wordpress-blocks-sass.scss
WordPress Blocks Styles - Cleaned Up, Commented & Sassified
/**
* WordPress Blocks
*
* Default block styling included with WordPress core.
* Provides a better starting point for WordPress theme developers,
* especially when using Sass.
*
* @link https://github.com/WordPress/WordPress/blob/master/wp-includes/css/dist/block-library/style.css
*
* Most styles from the above file are included.