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
/** | |
* Advanced Custom Field (ACF) Read Only Field | |
* | |
* Use prepare_field to display two fields but keep them read-only for non-admin users | |
* | |
* Check for Edit Screen: Non admin users can still add a value to inputs when adding post but | |
* cannot edit the input once created. | |
* | |
*/ |
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_action('wp_ajax_get_registrations_for_export', 'get_registrations_for_export'); | |
add_action('wp_ajax_nopriv_get_registrations_for_export', 'get_registrations_for_export'); | |
function get_registrations_for_export() { | |
// echo '<pre>';print_r($_GET);exit; | |
$post_statuses = array('unpaid', 'publish', 'cancelled'); | |
$args = array( | |
'post_type' => 'fka_registrations', | |
'post_status' => $post_statuses, |
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 get_template_part('coach/header', 'coach');?> | |
<?php | |
if ( !is_user_logged_in() ) { | |
auth_redirect(); | |
} | |
?> | |
<div class="page-wrap"> | |
<div id="content-container" class="container-fluid"> |
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
//WooCommerce Email Customizations | |
add_filter( 'woocommerce_email_recipient_customer_note', array( $this, 'fka_parent_email_recipient_filter_function' ), 10, 2); | |
add_filter( 'woocommerce_email_recipient_customer_completed_order', array( $this, 'fka_parent_email_recipient_filter_function' ), 10, 2); | |
add_filter( 'woocommerce_email_recipient_customer_invoice', array( $this, 'fka_parent_email_recipient_filter_function' ), 10, 2); | |
add_filter( 'woocommerce_email_recipient_customer_processing_order', array( $this, 'fka_parent_email_recipient_filter_function' ), 10, 2); | |
/** | |
* $recipient could be comma separated to send to additional people | |
* EX. $recipient .= ', $additonal_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
/** | |
* AUTO COMPLETE PAID ORDERS THAT ARE PAID BY CARD OR eCHECK | |
*/ | |
function fka_skip_processing_on_electronic_order( $status, $order_id ) { | |
// No updated status for orders delivered with Bank wire, Cash on delivery and Cheque payment methods. | |
if ( ( get_post_meta($order->id, '_payment_method', true) == 'bacs' ) || ( get_post_meta($order->id, '_payment_method', true) == 'cod' ) || ( get_post_meta($order->id, '_payment_method', true) == 'cheque' ) ) { | |
return; | |
} |