$settings Field configuration. * @var mixed $value Current saved value. * @var string $module_id Module ID. * * @package Merchant * @since 2.2.5 */ if ( ! defined( 'ABSPATH' ) ) { exit; } $coupons = get_posts( array( 'posts_per_page' => - 1, 'orderby' => 'title', 'order' => 'asc', 'post_type' => 'shop_coupon', 'post_status' => 'publish', ) ); if ( $coupons ) { ?>
'; echo ''; foreach ( $coupons as $coupon ) { $coupon_code = strtolower( $coupon->post_title ); echo ''; } echo ''; echo '' . esc_html__( 'Manage coupons', 'merchant' ) . ''; ?>
'; echo wp_kses_post( sprintf( /* Translators: 1. Coupon admin url 2. Link target attribute value */ __( 'No coupons found! Create a new coupon', 'merchant' ), admin_url( 'post-new.php?post_type=shop_coupon' ), '_blank' ) ); echo ''; echo ''; }