Skip to content

Instantly share code, notes, and snippets.

@New0
Last active January 19, 2019 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save New0/acccb6c85ee4262a81bd72ee1ab4af69 to your computer and use it in GitHub Desktop.
Save New0/acccb6c85ee4262a81bd72ee1ab4af69 to your computer and use it in GitHub Desktop.
Example use of filter to disable the Gutenberg block of Direct Stripe
<?php
/**
* Plugin Name: Disable Direct Stripe Gutenberg Block
* Description: Disable Direct Stripe Gutenberg Block
* Version: 1.0.0
* Author: Nicolas Figueira
* Author URI: https://newo.me
*
* This can be loaded as a plugin -> Download ZIP and from the WordPress adin go to Plugins -> Add Plugin and Click the Upload Plugin button to upload this zip and activate the plugin
*
* An alternative is to use line 13 within the functions.php file of a (child-)theme.
*/
add_filter( 'direct_stripe_should_load_gutenberg_block', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment