چیزی در اینجا پیدا نشد.
/** * 1. نمایش فیلدهای سال و ماه تولد در فرم پرداخت (بعد از جزئیات صورتحساب) */ add_action( 'woocommerce_after_checkout_billing_form', 'yasin_add_birth_date_fields' ); function yasin_add_birth_date_fields( $checkout ) { echo '
' . __( 'تاریخ تولد', 'woocommerce' ) . ': ' . $birth_year . ' / ' . $birth_month . '
'; } } /** * 5. نمایش در ایمیلهای ووکامرس (ارسال به مشتری و مدیر) */ add_filter( 'woocommerce_email_order_meta_fields', 'yasin_add_birth_date_to_emails', 10, 3 ); function yasin_add_birth_date_to_emails( $fields, $sent_to_admin, $order ) { $birth_month = get_post_meta( $order->get_id(), '_billing_birth_month', true ); $birth_year = get_post_meta( $order->get_id(), '_billing_birth_year', true ); if ( $birth_month && $birth_year ) { $fields['birth_date'] = array( 'label' => __( 'تاریخ تولد', 'woocommerce' ), 'value' => $birth_year . ' / ' . $birth_month, ); } return $fields; } ?>چیزی در اینجا پیدا نشد.