Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Plugin Name: WooCommerce Bestellung Anpassen
* Description: Ermöglicht das Bearbeiten von Artikelbeschreibungen und Preisen in bestehenden WooCommerce-Bestellungen.
* Version: 1.0.1
* Plugin URI: https://chris-martens.com/blog/woo-bestellung-aendern
* Author: Chris Martens
* Author URI: https://chris-martens.com
*/
@chrmrtns
chrmrtns / disable-SSL-verification.php
Last active December 7, 2023 15:41
Disable SSL Verification for Webhook in Woocommerce
<?php
/*
Plugin Name: Disable SSL Verification for Webhook in Woocommerce
Plugin URI: https://support.christian-martens.com
Description: Disable SSL Verification for Webhook in Woocommerce
Author: Chris Martens
Author URI: https://chris-martens.com
Version: 1.1
Text Domain: disable-ssl-woocommerce-webhook
@chrmrtns
chrmrtns / honeypot-for-wordpress-comments.php
Created November 16, 2023 11:02
Honeypot for Wordpress Comments - hide and use the url field for spam protection
/**
*
* @author Chris Martens
* @link https://chris-martens.com/
* @link https://chris-martens.com/blog/honeypot-fuer-kommentarfunktion/
* @snippet Comments without URL Field.
*
*/
/** Reduce spam comments */
@chrmrtns
chrmrtns / block_wp_user.php
Created November 14, 2023 06:20
Block specific users to create an account in Wordpress
<?php
function chrmrtns_block_email_addresses($user_id) {
// Liste der zu blockierenden E-Mail-Adressen - List of blocked email addresses
$blocked_emails = array(
'block@example.com',
'spam@example.net',
);
@chrmrtns
chrmrtns / redirect-to-product-from-product-category-instead-of-add-to-cart-links.txt
Last active November 10, 2023 12:56
Redirect to product from product category instead of add to cart links
@chrmrtns
chrmrtns / woocommerce_custom_button_text.txt
Last active November 10, 2023 12:56
WooCommerce Change Buttons according to price
/**
*
* @author Chris Martens
* @link https://chris-martens.com/
* @link https://chris-martens.com/jetzt-kostenlos-erhalten-in-woocommerce/
* @snippet Buttons ändern in WooCommerce.
*
*/
add_filter( 'add_to_cart_text', 'cm_woo_custom_single_add_to_cart_text' ); // < 2.1