WASHINGTON -- There was a time when President Barack Obama refused to shop at Walmart.

Evidently, he's evolved.

The president appear at a Northern California Walmart store Friday morning. The gathering is meant to tout energy efficiency, but it seems to have brought more attention to Walmart's wages -- and to Obama's new comfort level with the world's largest retailer.

Labor groups and progressives aren't happy about it.

"The president's visit sends a terrible message to workers across America," Joe Hansen, president of the United Food and Commercial Workers union, which has battled Walmart for years, said in a statement. "He is lending credibility to a bad actor when he should be joining the calls for Walmart to change."

The progressive online advocacy group CREDO declared the visit "outrageous" and called on the White House to scrap it. Pam Ramos, a Walmart worker employed at the very store Obama is visiting, wrote an op-ed in Salon asking the president to "tell Walmart to pay us enough to cover the bills."

In a Facebook post, Robert Reich, the former labor secretary under Bill Clinton, wondered, "What numbskull in the White House arranged this?"

And on Friday, protesters from the workers' group OUR Walmart flocked to the store in Mountain View, California, to voice their displeasure.

UFCW and its allies may feel slighted by the visit, but they shouldn't be surprised. The Obama administration has publicly lauded Walmart for its practices numerous times in the past. The only difference now is that the White House has lately made income inequality its stated top concern and pushed for a raise in the minimum wage. The proposal has gotten a huge boost from the strikes and protests carried out by workers at retailers including Walmart.

Despite criticizing the company on his first presidential campaign trail, Obama has been happy to align with the world's largest retailer on common causes while in the White House.

In 2011, Michelle Obama teamed up with Walmart to promote her "Let's Move" campaign against childhood obesity. When the retailer announced a five-year plan to reduce salt and fat contents in its food, the first lady stood in front of Walmart banners in Washington, D.C., and called the move "a victory for families" and "a victory for our children."

In 2013, the Obama administration was praising the world's largest retailer again, this time for its commitment to hiring veterans. The president and vice president joined Walmart U.S. CEO Bill Simon in an event at the White House, applauding the retailer's decision to offer a job to any honorably discharged soldier within a year of their ending active duty.

At the time, the AFL-CIO publicly criticized Obama for taking part in what it saw as essentially a Walmart public-relations campaign. Richard Trumka, the union federation's president, said the president's support was symbolic of "an acceptance of economic failure out of line with America's history or future." (This time, the AFL-CIO is quiet on Obama's visit to the Mountain View Walmart. The labor federation declined comment to HuffPost.)

The White House's coziness with Walmart was a little harder to imagine around the time of Obama's first presidential run. Back then, candidate Obama took the standard progressive line of denouncing Walmart as a low-wage boogeyman. In 2007, the then-senator declared to an AFL-CIO town hall forum that he wouldn't shop at Walmart stores. "As profitable as they are, there's no reason they can't afford to pay" their workers a higher wage, he said.

During Obama's bruising primary with Hillary Clinton, he even lambasted his opponent for her work on Walmart's board of directors. "If [Clinton staffers] want to defend her service to one of the least environmentally-friendly, least labor union-friendly companies in the country, they're welcome to do that," an Obama spokesman said at the time.