This file contains 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
/* By deafault State fields for Greece is not mandatory. | |
If you want to change it to mandatory, add this code snippet into function.php. | |
I found this solutions there: https://www.mootpoint.org/blog/woocommerce-make-uk-county-field-required/ */ | |
add_filter( 'woocommerce_get_country_locale', 'mp_change_locale_field_defaults'); | |
function mp_change_locale_field_defaults($countries) { | |
$countries['GR']['state']['required'] = true; | |
return $countries; |
This file contains 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
// Όταν θέλω να αφαιρέσω πχ το {loadposition banner_con} | |
// Info: https://digwp.com/2010/03/remove-replace-content-wordpress-database/ | |
UPDATE rg_posts SET post_content = REPLACE ( post_content, '{loadposition banner_con}', '' ); |
This file contains 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 or modify States https://docs.woocommerce.com/document/addmodify-states/ | |
*/ | |
add_filter( 'woocommerce_states', 'custom_woocommerce_states' ); | |
function custom_woocommerce_states( $states ) { | |
$states['XX'] = array( | |
'XX1' => 'State 1', | |
'XX2' => 'State 2' |
This file contains 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
/* Hide element from Spanish language */ | |
.hideLang:lang(es) {display: none !important;} | |
This DIV will be hidden from Spanish, for instance. | |
1 | |
<div class="hideLang">Hello my friend</div> |
This file contains 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
Δήμος | Κωδ Περιφ Ενότητας | Περιφερειακή Ενότητα | Κωδικός Χώρας | Χώρα | |
---|---|---|---|---|---|
Αμφιλοχίας | ΑΙΤ | Αιτωλοακαρνανίας | GR | Ελλάδα | |
Ακτίου-Βόνιτσας | ΑΙΤ | Αιτωλοακαρνανίας | GR | Ελλάδα | |
Ξηρομέρου | ΑΙΤ | Αιτωλοακαρνανίας | GR | Ελλάδα | |
Ιεράς Πόλεως Μεσολογγίου | ΑΙΤ | Αιτωλοακαρνανίας | GR | Ελλάδα | |
Αγρινίου | ΑΙΤ | Αιτωλοακαρνανίας | GR | Ελλάδα | |
Θέρμου | ΑΙΤ | Αιτωλοακαρνανίας | GR | Ελλάδα | |
Ναυπακτίας | ΑΙΤ | Αιτωλοακαρνανίας | GR | Ελλάδα | |
Δήμος Άργους - Μυκηνών | ΑΡΓ | Αργολίδας | GR | Ελλάδα | |
Ναυπλιέων | ΑΡΓ | Αργολίδας | GR | Ελλάδα |
This file contains 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
/* Adding SKU to shop page */ | |
function qwerty_gr_custom_shop_item() { | |
global $post, $product; | |
/* product sku */ | |
echo '<p>SKU: '.$product->get_sku().'</p>'; | |
} | |
add_action( 'woocommerce_after_shop_loop_item', 'qwerty_gr_custom_shop_item', 5); |
This file contains 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 | |
/** | |
* Plugin Name: Disable WooCommerce Admin | |
* Description: This plugin disables the new WooCommerce Admin package in WooCommerce. | |
* Version: 1.0 | |
*/ | |
add_filter( 'woocommerce_admin_disabled', '__return_true' ); |
This file contains 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 | |
// Do NOT include the opening php tag. | |
// Place in your theme's functions.php file | |
// Set address 2 to not required | |
add_filter('woocommerce_checkout_fields', 'unrequire_address_2_checkout_fields' ); | |
function unrequire_address_2_checkout_fields( $fields ) { | |
$fields['billing']['billing_address_2']['required'] = false; | |
$fields['shipping']['shipping_address_2']['required'] = false; |
OlderNewer