/    Sign up×
Community /Pin to ProfileBookmark

How to change product fetching database table in wordpress

Hi
Right now my product related data is being fetched from wp_posts table whereas i want it to be fetched from wpstg0_posts table.

Both the tables are in the same database, i cannot merge the data as it would collide the ID’s in both.

Basically I want the products and all the related data to be fetched from prefix wpstg0_ instead of wp_

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@aquatecMay 11.2022 — It's difficult to teach you. So, you [url=https://aquatecinnovative.com/wordpress-development-services/]Hire WordPress Developer[/url] from Aquatec Innovative Pvt. Ltd. They provide you best [url=https://aquatecinnovative.com/wordpress-development-services/]WordPress Development Services[/url] and resolve all the issues you are facing.
Copy linkTweet thisAlerts:
@JamesMerchantMay 17.2022 — You have to break a lot of code in WordPress core, and in the theme and plugin ecosystems. It would take a long time to develop your changes, it could end up making bugs in your WordPress. Plus, you would have to backmerge each successive update from WordPress, WooCommerce, and whatever theme and plugins you use.

WordPress and WooCommerce are organized around the uniqueness of post ID values. That is, many features of the meta and taxonomy subsystems use post IDs.

WooCommerce exploits those subsystems to organize products.

You can stand up a different WordPress instance in the same database and give it a different table prefix name.

I hope it could help you.
×

Success!

Help @JodaJacksoncatrina spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.23,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...