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_styles', 'my_filter_woocommerce_email_styles' ); | |
/** | |
* Filter email styles for WooCommerce and AutomateWoo. | |
* | |
* @param string $css | |
* | |
* @return string |
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 | |
// Prevent email capture and session tracking from the comment form | |
add_action( 'automatewoo_loaded', function() { | |
remove_action( 'comment_post', [ 'AutomateWoo\Session_Tracker', 'capture_from_comment' ] ); | |
}); |
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 | |
// Requires AW 4.3 | |
// create date object | |
$date = new AutomateWoo\DateTime( '2018-07-23 06:12:04' ); | |
// get the queued event by ID | |
$event = AutomateWoo\Queued_Event_Factory::get( $event_id ); | |
$event->set_date_due( $date ); |
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 | |
/** | |
* Using this filter will completely override the value of 'Require cookie consent' in settings. | |
* Presubmit tracking is depending on session tracking so this filter will also control when presubmit tracking is permitted | |
* (unless presubmit tracking is completely disabled in settings). | |
*/ | |
add_filter( 'automatewoo/session_tracking/cookies_permitted', 'my_filter_automatewoo_session_tracking_cookies_permitted' ); | |
/** |
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_order_is_paid_statuses', 'my_custom_woocommerce_order_is_paid_statuses' ); | |
/** | |
* @param array $statuses | |
* @return array | |
*/ | |
function my_custom_woocommerce_order_is_paid_statuses( $statuses ) { | |
// already included statuses are processing and completed |
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( 'automatewoo/referrals/reward_amount', 'filter_automatewoo_referrals_reward_amount', 10, 3 ); | |
/** | |
* @param float $reward_amount | |
* @param \AutomateWoo\Referrals\Advocate $advocate | |
* @param \WC_Order $order | |
* @return float | |
*/ |
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 | |
// Run AutomateWoo events every 5 minutes instead of every minute | |
add_action( 'automatewoo_loaded', function() { | |
remove_action( 'automatewoo_events_worker', [ 'AutomateWoo\Cron', 'before_worker' ], 1 ); | |
remove_action( 'automatewoo_events_worker', [ 'AutomateWoo\Events', 'run_due_events' ] ); | |
add_action( 'automatewoo_five_minute_worker', [ 'AutomateWoo\Events', 'run_due_events' ] ); | |
} ); |
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( 'automatewoo/referrals/advocate_id', 'my_filter_automatewoo_advocate_id_for_team_leader' ); | |
/** | |
* @param $user_id | |
* @return int | |
*/ | |
function my_filter_automatewoo_advocate_id_for_team_leader( $user_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 | |
add_action( 'automatewoo_loaded', function() { | |
remove_action( 'automatewoo_five_minute_worker', [ 'AutomateWoo\Queue_Manager', 'check_for_queued_events' ] ); | |
add_action( 'automatewoo_events_worker', [ 'AutomateWoo\Queue_Manager', 'check_for_queued_events' ] ); | |
} ); |
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( 'automatewoo/referrals/account_tab_share_link_text', function() { | |
return __( 'Insert custom share link text here.', 'text-domain' ); | |
}); |