Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide warranty from order #20

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

Shahreyar46
Copy link

Hide warranty from order by checkbox from backend

@Shahreyar46 Shahreyar46 self-assigned this Jun 10, 2021
@@ -53,7 +53,7 @@ public function show_warranty() {
$duration = wcrw_get_duration_value( $warranty['length_duration'], $value );
echo '<p class="wcrw_warranty_info"><strong>'. $warranty_label .':</strong> '. $value .' '. $duration .'</p>';
} else {
echo '<p class="wcrw_warranty_info"><strong>'. $warranty_label .':</strong> '. __( 'Lifetime', 'wc-return-warranty' ) .'</p>';
echo '<p class="wcrw_warranty_info"><strong>'. "hello" .$warranty_label .':</strong> '. __( 'Lifetime', 'wc-return-warranty' ) .'</p>';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is hello here ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to remove this . I used this for testing output

@@ -198,6 +198,7 @@ function get_item_data( $other_data, $cart_item ) {
$product_id = $_product->get_id();

$warranty = wcrw_get_warranty_settings( $product_id );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix line indentation


if ( $order_date ) {
$expiry = wcrw_get_warranty_date( $order_date, $warranty['length_value'], $warranty['length_duration'] );
if ('no' == $warranty['hide_order_warranty'] ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes === check instead ==

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants