Function Reference: geodir_payment_checkout_page_content

Summary

This function has not been documented yet.

Actions

‘geodir_checkout_before_form_fields’ [Line: 1473]

‘geodir_checkout_item_extra_terms’ [Line: 1495]

‘geodir_payment_method_fields’ [Line: 1549]

‘geodir_checkout_after_form_fields’ [Line: 1570]

Filters

‘geodir_payment_cart_button_text’ [Line: 1545]

Source Code

function geodir_payment_checkout_page_content() {
$cart = geodir_payment_get_cart();

if ( !empty( $cart ) ) {
wp_enqueue_style( ‘gd_payment-cart-style’, plugins_url( ”, __FILE__ ) . ‘/css/gd-cart.css’, array(), GEODIRPAYMENT_VERSION );

add_action( ‘wp_footer’, ‘geodir_payment_localize_all_js_msg’ );

wp_register_script( ‘gd_payment-cart-js’, plugins_url( ”,__FILE__ ) . ‘/js/gd-cart.js’, array(), GEODIRPAYMENT_VERSION );
wp_enqueue_script( ‘gd_payment-cart-js’ );

$recurring_pkg = geodir_payment_invoice_is_recurring_pkg( $cart );
$payment_methods = geodir_payment_get_methods( $recurring_pkg );

$recurring_desc = ”;
$free_trial_desc = ”;

if ($recurring_pkg) {
$package_info = (array)geodir_get_post_package_info( $cart->package_id, $cart->post_id );

if (!empty($package_info)) {
$desc_suffix = (int)$package_info[‘sub_num_trial_days’] > 0 ? __( ‘Then charged’ , ‘geodir_payments’ ) : __( ‘Charged’ , ‘geodir_payments’ );
$recurring_desc = geodir_payment_recurring_pay_desc( $package_info[‘sub_units’], $package_info[‘sub_units_num’], $package_info[‘sub_units_num_times’], $desc_suffix );

if ( (int)$package_info[‘sub_num_trial_days’] > 0 ) {
$free_trial_desc = geodir_payment_checkout_free_trial_desc( $package_info[‘sub_num_trial_days’], $package_info[‘sub_num_trial_units’] );
}
}
}

$form_action = get_page_link( geodir_payment_checkout_page_id() );

$post_type = geodir_payment_cart_post_type( $cart->id );

$item_name = $cart->post_title;
$coupon_code = trim( $cart->coupon_code );
$coupon_code = geodir_is_valid_coupon( $post_type, $coupon_code ) ? $coupon_code : ”;

$payment_method = $cart->paymentmethod;

$amount = $cart->amount;
$tax_amount = $cart->tax_amount;
$discount = $cart->discount;
$paied_amount = $cart->paied_amount;

$amount_display = $cart->amount_display;
$tax_amount_display = $cart->tax_amount_display;
$discount_display = $cart->discount_display;
$paied_amount_display = $cart->paied_amount_display;

$coupon_allowed = geodir_payment_allow_coupon_usage(array(‘cart_id’ => $cart->id));

$recurring_coupon_info = ”;
if ( $recurring_pkg && $coupon_allowed && $coupon_code && geodir_payment_coupon_is_recurring($coupon_code) ) {
$recurring_coupon_info = ‘ ‘ . __(‘for the first installment only’ , ‘geodir_payments’);
}
?>


0 || $coupon_allowed ) { ?>


0 ) { ?>




0 ) { ?>

  • “>