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 | |
add_action('admin_init', function () { | |
// Redirect any user trying to access comments page | |
global $pagenow; | |
if ($pagenow === 'edit-comments.php') { | |
wp_redirect(admin_url()); | |
exit; | |
} |
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
<div class="wrapper"> | |
<div class="header"> | |
<div class="shop-title"> | |
<p class="to-uppercase"> | |
{{ shop.name }} | |
</p> | |
</div> | |
<div class="order-title"> | |
<p class="text-align-right"> | |
Bestellung: {{ order.name }} |
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( 'rest_authentication_errors', 'disable_rest_api' ); | |
function disable_rest_api( $access ) { | |
return new WP_Error( 'rest_disabled', __( 'The WordPress REST API has been disabled on this site.' ), array( 'status' => rest_authorization_required_code() ) ); | |
} |
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
// Ablaufdatum- und Ablaufzeit-Felder zum Produkt hinzufügen | |
add_action('woocommerce_product_options_general_product_data', 'add_product_expiration_date_field'); | |
function add_product_expiration_date_field() { | |
woocommerce_wp_text_input(array( | |
'id' => '_expiration_date', | |
'label' => __('Ablaufdatum', 'woocommerce'), | |
'type' => 'date', | |
'desc_tip' => true, | |
'description' => __('Geben Sie das Ablaufdatum für das Produkt ein.', 'woocommerce') | |
)); |