Registration Surcharges
/* * REGISTRATION SURCHARGES * * Add a custom surcharge to your cart / checkout * change the $percentage to set the surcharge to a value to suit * * Loop through the cart items by category * Add $1…Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
/* * REGISTRATION SURCHARGES * * Add a custom surcharge to your cart / checkout * change the $percentage to set the surcharge to a value to suit * * Loop through the cart items by category * Add $1…Continue reading
https://youtube.com/@R0CKHEMAR?si=1cHo63EBjMpUjblmContinue reading
add_filter(‘rest_endpoints’, function( $endpoints ) { if ( isset( $endpoints[‘/wp/v2/users’] ) ) { unset( $endpoints[‘/wp/v2/users’] ); } if ( isset( $endpoints[‘/wp/v2/users/(?P[\d]+)’] ) ) { unset( $endpoints[‘/wp/v2/users/(?P[\d]+)’] ); } return $endpoints; });Continue reading
define(‘CORE_UPGRADE_SKIP_NEW_BUNDLED’, true);Continue reading
// Return a 404 page for author pages if accessed directly. add_action( ‘template_redirect’, function () { if ( is_author() ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } ); // Remove the author links. add_filter( ‘author_link’, ‘__return_empty_string’, 1000…Continue reading
add_action( ‘after_setup_theme’, function() { remove_theme_support( ‘core-block-patterns’ ); });Continue reading
add_filter( ‘allowed_block_types_all’, function ( $allowed_block_types, $block_editor_context ) { // List here the blocks you want to disallow. https://developer.wordpress.org/block-editor/reference-guides/core-blocks/ $disallowed_blocks = array( ‘core/navigation’, ‘core/query’, ); if ( ! is_array( $allowed_block_types ) || empty( $allowed_block_types ) ) { $registered_blocks = WP_Block_Type_Registry::get_instance()->get_all_registered(); $allowed_block_types…Continue reading
add_filter( ‘user_has_cap’, function ( $allcaps, $caps, $args, $user ) { if ( in_array( ‘contributor’, $user->roles ) && empty( $caps[‘upload_files’] ) ) { $allcaps[‘upload_files’] = true; } return $allcaps; }, 10, 4 );Continue reading
/** * Ensures that a Statement Descriptor is not sent to the Stripe PaymentIntent creation process. * * This is a HOTFIX and is not intended for long-term use. We recommend updating to Easy Digital Downloads 3.2.8+ * * This…Continue reading