This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This function will add new custom avatar to WordPress. | |
* | |
* @param array $avatars List of avatars in WordPress. | |
* | |
* @author Mehul Gohil | |
* @link https://www.mehulgohil.in/set-default-avatar/ | |
* | |
* @return array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Enqueue Inline Styles in WordPress. | |
* | |
* @author Mehul Gohil | |
* @link https://www.mehulgohil.in/code-snippets/enqueue-inline-styles/ | |
*/ | |
function mg_enqueue_inline_styles() { | |
$css = ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Stripe\Error\InvalidRequest Object | |
( | |
[message:protected] => Invalid token id: card_1CNHELLyXkL8xusLcSLH59hA | |
[string:Exception:private] => | |
[code:protected] => 0 | |
[file:protected] => /app/public/wp-content/plugins/Give-Stripe/vendor/stripe/stripe-php/lib/ApiRequestor.php | |
[line:protected] => 124 | |
[trace:Exception:private] => Array | |
( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$source_args = apply_filters( 'give_stripe_get_source_args', array( | |
'type' => 'card', | |
'token' => $token_id, | |
) ); | |
$charge_options = array(); | |
if ( give_is_stripe_connected() ) { // This ensures that stripe is connected using Connect API. | |
$charge_options['stripe_account'] = give_get_option( 'give_stripe_user_id' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Welcome to the WP Core Development Wizard. | |
# | |
# Author: Mehul Gohil | |
# Email: [email protected] | |
# Supports: Local 5.2.8. or later | |
# | |
# PreRequisites: | |
# 1. Install wget, subversion, curl, php5-cli, and git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove Existing Product Data Tabs from Products Detail Page | |
* | |
* @param array $tabs List of Tabs displayed on Products Detail Page. | |
* | |
* @return array $tabs | |
*/ | |
function mg_woo_remove_product_tabs( $tabs ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mg_woo_rename_tabs( $tabs ) { | |
// Rename the Description Tab. | |
$tabs['description']['title'] = __( 'Details', 'your-textdomain-here' ); | |
// Rename the Reviews Tab. | |
$tabs['reviews']['title'] = __( 'Ratings', 'your-textdomain-here' ); | |
// Rename the Additional Information Tab. | |
$tabs['additional_information']['title'] = __( 'More Information', 'your-textdomain-here' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The Class. | |
*/ | |
class Give_Sample_Meta_Box { | |
/** | |
* Hook into the appropriate actions when the class is constructed. | |
*/ | |
public function __construct() { |