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 | |
add_filter( 'cppw_map_width', function( $width ) { | |
return 200; | |
} ); | |
add_filter( 'cppw_map_height', function( $height ) { | |
return 100; | |
} ); |
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 | |
// Multibanco IfThen - Keep order pending instead of on-hold - Be advised that no "new order" email will be sent to the client | |
add_filter( 'multibanco_ifthen_set_on_hold', '__return_false' ); | |
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 | |
/* WooCommerce emails for cancelled pending orders */ | |
add_action('woocommerce_order_status_pending_to_cancelled', 'pending_cancelled_send_an_email_notification', 10, 2 ); | |
function pending_cancelled_send_an_email_notification( $order_id, $order ) { | |
if ( version_compare( WC_VERSION, '3.0.8', '>=' ) ) { | |
// Getting all WC_emails objects | |
$email_notifications = WC()->mailer()->get_emails(); | |
// Sending the email | |
$email_notifications['WC_Email_Cancelled_Order']->trigger( $order_id ); |
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 | |
add_filter( 'woocommerce_email_recipient_cancelled_order', 'cancelled_order_add_customer_email', 10, 2 ); | |
function cancelled_order_add_customer_email( $recipient, $order ) { | |
if ( $order ) { | |
return $recipient . ',' . ( version_compare( WC_VERSION, '3.0', '>=' ) ? $order->get_billing_email() : $order->billing_email ); | |
} else { | |
return $recipient; | |
} | |
} |
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 | |
// Multibanco IfThen - Cancel orders if "Manage stock" and "Hold stock (minutes)" are configured - Be advised that the Multibanco reference will still be active and can be paid | |
add_filter( 'multibanco_ifthen_cancel_unpaid_orders', '__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 add_filter( 'woocommerce_helper_suppress_admin_notices', '__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 | |
/* Hide WooCommerce default category on the frontend */ | |
add_filter( 'woocommerce_product_subcategories_args', 'woocommerce_hide_default_category' ); | |
function woocommerce_hide_default_category( $args ) { | |
$args['exclude'] = get_option( 'default_product_cat' ); | |
return $args; | |
} |
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
//Marco Almeida - Webdados | |
#target photoshop | |
app.bringToFront(); | |
app.preferences.rulerUnits = Units.PIXELS; | |
gFilesToSkip = Array( "db", "xmp", "thm", "txt", "doc", "md0", "tb0", "adobebridgedb", "adobebridgedbt", "bc", "bct" ); |
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 | |
/* Removes the "added to cart" message and "continue shopping" link after a product was added to the cart and the user was redirected to the cart page */ | |
add_filter( 'wc_add_to_cart_message_html', 'remove_wc_add_to_cart_message_html' ); | |
function remove_wc_add_to_cart_message_html( $message ) { | |
$message = ''; | |
return $message; | |
} | |
?> |
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 | |
add_filter( 'pvkw_map_width', function( $width ) { | |
return 200; | |
} ); | |
add_filter( 'pvkw_map_height', function( $height ) { | |
return 100; | |
} ); |