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
/* german market bugfix */ | |
remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 ); | |
add_action( 'woocommerce_checkout_before_terms_and_conditions', 'woocommerce_checkout_payment', 20 ); | |
/* modify german market disclaimer */ | |
add_filter( 'wgm_disclaimer_line', 'wh_modify_disclaimer' ); | |
function wh_modify_disclaimer( $disclaimer_line ) { | |
$url = get_bloginfo('url'); | |
$disclaimer_line = 'Hier erfahren Sie mehr zu den <a href="'.$url.'/versand__zahlung/" class="wgm-versandkosten" target="_blank">Versandkosten</a>, der <a href="'.$url.'/zahlungsweisen/" class="wgm-zahlungsarten" target="_blank">Zahlungsart</a> und unserer <a href="'.$url.'/widerruf/" class="wgm-widerruf" target="_blank">Widerrufsbelehrung</a>'; |
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
add_action('woocommerce_loaded','remove_woo_customizer_options'); | |
function remove_woo_customizer_options() { | |
$woo_customizer = new WC_Shop_Customizer(); | |
remove_action( 'customize_register', array( $woo_customizer, 'add_sections' ) ); | |
remove_action( 'customize_controls_print_styles', array( $woo_customizer, 'add_styles' ) ); | |
remove_action( 'customize_controls_print_scripts', array( $woo_customizer, 'add_scripts' ), 30 ); |
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
(function (blocks, components, i18n, element) { | |
var el = element.createElement; | |
var children = blocks.source.children; | |
var BlockControls = wp.blocks.BlockControls; | |
var InspectorControls = wp.blocks.InspectorControls; | |
var TextControl = wp.blocks.InspectorControls.TextControl; | |
var SelectControl = wp.blocks.InspectorControls.SelectControl; | |
var ColorPalette = wp.blocks.ColorPalette; | |
blocks.registerBlockType('atomion/divider-block', { |
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
add_filter( 'woocommerce_available_payment_gateways', 'gm_conditional_payment', 1 ); | |
function gm_conditional_payment( $gateways ) { | |
global $woocommerce; | |
if ( $woocommerce->cart->total > 1000 ) { | |
unset( $gateways['german_market_purchase_on_account'] ); | |
} | |
return $gateways; |
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
add_action('wp_head','ps_scroll_on_submit'); | |
function ps_scroll_on_submit() { | |
if(isset($_POST['submit'])) { | |
?> | |
<script> | |
$(function() { | |
$('html, body').animate({ | |
scrollTop: $("#yourDiv").offset().top | |
}, 2000); |
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
/** | |
* Display custom cart info | |
* | |
* @param array $item_data | |
* @param array $cart_item | |
* | |
* @return array | |
*/ | |
function rbp_display_custom_cart_info( $item_data, $cart_item ) { |
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
const mozjpeg = require('imagemin-mozjpeg'); | |
grunt.initConfig({ | |
imagemin: { | |
static: { | |
options: { | |
optimizationLevel: 3, | |
svgoPlugins: [{removeViewBox: false}], | |
use: [mozjpeg()] // Example plugin usage | |
}, |
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
add_filter( 'wp_wc_invoice_pdf_after_billing_address', 'woocommerce_email_order_meta_add_email_to_invoice_pdf' ); | |
function woocommerce_email_order_meta_add_email_to_invoice_pdf($order) { | |
if ( method_exists( $order, 'get_billing_email' ) ) { | |
$customer_email = $order->get_billing_email(); | |
if ( ! empty( $customer_email ) ) { |
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
add_filter( 'woocommerce_variable_sale_price_html', 'rbp_new_variation_price_order', 10, 2 ); | |
add_filter( 'woocommerce_variable_price_html', 'rbp_new_variation_price_order', 10, 2 ); | |
function rbp_new_variation_price_order() { | |
$product = wc_get_product( get_the_id() ); | |
if ( $product->is_type( 'variable' ) ) { |
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
/** | |
* Privacy Declaration for My Account Registration | |
* | |
* @wp-hook woocommerce_register_form | |
* @since 3.6 | |
* @static | |
* @access public | |
* @return void | |
**/ | |
public static function my_account_registration_fields() { |
OlderNewer