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 | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
global $woocommerce, $post; | |
if ( $post->post_content ) : ?> | |
<?php $heading = esc_html( apply_filters('woocommerce_product_description_heading', __('Product Description', 'yiw' ))); ?> | |
<h2><?php echo $heading; ?></h2> |
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
echo do_shortcode( '[one_column]' . $static . '[/one_column][one_column]' . $dynamic . '[/one_column]' ); |
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
add_action('admin_init', 'refresh_user_course_completion_data'); | |
function refresh_user_course_completion_data(){ | |
if( ! isset( $_GET['sensei_update_user_course_data'] ) ){ | |
return; | |
} | |
if( 'start'== $_GET['sensei_update_user_course_data'] ) { |
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
SELECT SUM( meta__order_total.meta_value) as total_sales,SUM( meta__order_shipping.meta_value) as total_shipping,SUM( meta__order_tax.meta_value) as total_tax,SUM( meta__order_shipping_tax.meta_value) as total_shipping_tax, posts.post_date as post_date FROM wp_posts AS posts LEFT JOIN wp_postmeta AS meta__order_total ON posts.ID = meta__order_total.post_id LEFT JOIN wp_postmeta AS meta__order_shipping ON posts.ID = meta__order_shipping.post_id LEFT JOIN wp_postmeta AS meta__order_tax ON posts.ID = meta__order_tax.post_id LEFT JOIN wp_postmeta AS meta__order_shipping_tax ON posts.ID = meta__order_shipping_tax.post_id LEFT JOIN wp_posts AS parent ON posts.post_parent = parent.ID | |
WHERE posts.post_type IN ( 'shop_order_refund','shop_order' ) | |
AND posts.post_status IN ( 'wc-completed','wc-processing','wc-on-hold') | |
AND ( parent.post_status IN ( 'wc-completed','wc-processing','wc-on-hold') OR parent.ID IS NULL ) | |
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
/** | |
* Output the proceed to checkout button. | |
* | |
* @subpackage Cart | |
*/ | |
function woocommerce_button_proceed_to_checkout() { | |
$checkout_url = WC()->cart->get_checkout_url(); | |
?> | |
<a href="<?php echo $checkout_url; ?>" class="checkout-button button alt wc-forward"><?php _e( 'Proceed to Checkout', 'woocommerce' ); ?></a> |
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
.woocommerce .col2-set, .woocommerce-page .col2-set { | |
width: 48%; | |
float: left; | |
} | |
.woocommerce .col2-set .col-1, .woocommerce-page .col2-set .col-1 { | |
width: 100%; | |
} | |
div#order_review { |
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
add_action( 'woocommerce_subscriptions_renewal_order_created', 'wc_subs_custom_mark_free_renewals_processing' ); | |
function wc_subs_custom_mark_free_renewals_processing( $renewal ) { | |
if ( ! $renewal->get_total() ) { | |
$renewal->update_status( 'processing' ); | |
} | |
} |
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
/** | |
* Auto Complete all WooCommerce orders. | |
*/ | |
add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' ); | |
function custom_woocommerce_auto_complete_order( $order_id ) { | |
if ( ! $order_id ) { | |
return; | |
} | |
$order = wc_get_order( $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
/** | |
* Auto Complete all WooCommerce orders. | |
*/ | |
add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' ); | |
function custom_woocommerce_auto_complete_order( $order_id ) { | |
if ( ! $order_id ) { | |
return; | |
} | |
$order = new WC_Order( $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
function my_amazon_payments_handler() { | |
global $wc_amazon_payments_advanced; | |
if ( class_exists( 'WC_Subscriptions_Cart' ) ) { | |
if ( WC_Subscriptions_Cart::cart_contains_subscription() || WC_Subscriptions_Cart::cart_contains_subscription_renewal() || ( is_checkout_pay_page() && WC_Subscriptions_Order::order_contains_subscription( $wp->query_vars['order-pay'] ) ) ) { | |
remove_action( 'woocommerce_before_cart', array( $wc_amazon_payments_advanced, 'checkout_message' ), 5 ); | |
remove_action( 'woocommerce_before_checkout_form', array( $wc_amazon_payments_advanced, 'checkout_message' ), 5 ); | |
remove_action( 'before_woocommerce_pay', array( $wc_amazon_payments_advanced, 'checkout_message' ), 5 ); | |
} | |
} |