Skip to content

Instantly share code, notes, and snippets.

@bporcelli
Created February 17, 2022 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bporcelli/a36e4879033393bbae2ac8cdbd88f99b to your computer and use it in GitHub Desktop.
Save bporcelli/a36e4879033393bbae2ac8cdbd88f99b to your computer and use it in GitHub Desktop.
[MarketShip] Change free shipping help text with template override
<?php
/**
* Shipping method settings template.
*
* Overridden to output custom help text for Free Shipping.
*
* @global MarketShip_Shipping_Method $shipping_method Shipping method instance.
*
* @author Brett Porcelli <brett@thepluginpros.com>
* @package MarketShip
* @version 5.1.1
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<form action="" method="post" id="shipping-form" class="dokan-form-horizontal marketship-form method-settings-form">
<?php if ( 'free_shipping' === $shipping_method->id ) : ?>
<p><?php esc_html_e( 'My free shipping help text' ); ?></p>
<?php endif; ?>
<?php $shipping_method->vendor_options( 'dokan' ); ?>
<?php if ( $shipping_method->supports( 'submit-button' ) ) : ?>
<div class="dokan-form-group">
<div class="dokan-w12 ajax_prev">
<input type="hidden" name="method_id" value="<?php echo esc_attr( $shipping_method->id ); ?>">
<button type="submit" name="dokan_update_marketship_settings" class="dokan-btn dokan-btn-info">
<?php esc_html_e( 'Save Changes', 'marketship' ); ?>
</button>
</div>
</div>
<?php endif; ?>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment