Install WooCommerce to use this feature.', 'adworksbid-seo' ), [ 'a' => [ 'href' => true ] ] ), esc_url( admin_url( 'plugin-install.php?s=woocommerce&tab=search&type=term' ) ) ); ?>

{title} {price} {sku} {sitename}.', 'adworksbid-seo' ), [ 'code' => [] ] ); ?>

__( 'Fixing…', 'adworksbid-seo' ), 'fix_alt' => __( 'Fix Missing Image Alt Text', 'adworksbid-seo' ), 'fixed_singular' => __( 'Fixed 1 image.', 'adworksbid-seo' ), /* translators: %d = number of image alt texts fixed */ 'fixed_plural' => __( 'Fixed %d images.', 'adworksbid-seo' ), 'failed' => __( 'Failed.', 'adworksbid-seo' ), ] ) . ';'; $awb_woo_js .= <<<'AWBWOOJS' jQuery(function($){ $('#awb-woo-settings-form').on('submit', function(e){ e.preventDefault(); var data = { action: 'awbseo_save_woo_settings', nonce: AWBSEO.nonce, out_of_stock_noindex: 0 }; $(this).serializeArray().forEach(function(f){ data[f.name] = f.value; }); var $msg = $(this).find('.awb-saved-msg'); $.post(AWBSEO.ajax_url, data, function(res){ if (res.success) { $msg.show(); setTimeout(function(){ $msg.hide(); }, 1500); } }); }); $('#awb-woo-fix-alt').on('click', function(){ var $btn = $(this).prop('disabled', true).text(_awbWooStr.fixing); $.post(AWBSEO.ajax_url, { action: 'awbseo_woo_bulk_fix_alt', nonce: AWBSEO.nonce }, function(res){ $btn.prop('disabled', false).text(_awbWooStr.fix_alt); if (res.success) { var n = res.data.fixed; var msg = n === 1 ? _awbWooStr.fixed_singular : _awbWooStr.fixed_plural.replace('%d', n); $('#awb-woo-fix-alt-result').text(msg); } else { $('#awb-woo-fix-alt-result').text(res.data || _awbWooStr.failed); } }); }); }); AWBWOOJS; wp_add_inline_script( 'awbseo-admin', $awb_woo_js ); ?>