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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> |
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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# add a trailing slash to /wp-admin | |
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^ - [L] |
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 | |
$html = '<a class="online-podani-sledovani" href="https://www.postaonline.cz/trackandtrace/-/zasilka/cislo?parcelNumbers='.$parcel_code.'" target="_blank" class="button">'.__('Sledujte zásilku online','musilda-online-podani').'</a>'; | |
$html = apply_filters( 'online-podani-sledovani-link', $html, $parcel_code, $order_id ); |
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 | |
$chars = array ( | |
/** Cyrillics **/ | |
'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', | |
'Д' => 'D', 'Е' => 'E', 'Ё' => 'E', 'Ж' => 'Zh', | |
'З' => 'Z', 'И' => 'I', 'Й' => 'I', 'К' => 'K', | |
'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O', | |
'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', | |
'У' => 'U', 'Ф' => 'F', 'Х' => 'Kh', 'Ц' => 'Ts', |
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_filter( 'woocommerce_email_recipient_customer_completed_order', 'your_email_recipient_filter_function', 10, 2); | |
function your_email_recipient_filter_function($recipient, $object) { | |
$recipient = $recipient . ', [email protected]'; | |
return $recipient; | |
} | |
add_filter( 'woocommerce_email_headers', 'mycustom_headers_filter_function', 10, 2); |
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 | |
/** | |
* Hide category product count in product archives | |
*/ | |
add_filter( 'woocommerce_subcategory_count_html', '__return_false' ); |
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 | |
// Use minified libraries if SCRIPT_DEBUG is turned off | |
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; | |
wp_enqueue_script( 'my-script-handle', plugin_dir_url( __FILE__ ) . 'assets/my-file' . $suffix . '.js', array( 'jquery' ) ); | |
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 | |
// Delete all failed orders custom action | |
add_action( 'musilda_delete_failed_orders', 'musilda_delete_all_failed_orders' ); | |
// This function will run once the 'musilda_delete_failed_orders' is called | |
function musilda_delete_all_failed_orders() { | |
$args = array( | |
'status' => 'failed', | |
); |
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 | |
global $wp_aui; | |
$custom_posts = get_posts($args); | |
foreach($custom_posts as $post) : setup_postdata($post); | |
$content = $wp_aui->save($post); | |
wp_insert_post( array( 'ID' => $post->ID, 'post_content' => $content ) ); | |
endforeach; |