AdventureTours
4 weeks ago
Aurum
4 weeks ago
FacebookForWc
4 weeks ago
Flatsome
4 weeks ago
GravityForms
4 weeks ago
KlarnaPayments
4 weeks ago
MaxStorePro
4 weeks ago
PerProductShipping
4 weeks ago
Relevanssi
4 weeks ago
Sensei
4 weeks ago
TableRateShipping
4 weeks ago
TheEventsCalendar
4 weeks ago
TmExtraProductOptions
4 weeks ago
WcAjaxLayeredNav
4 weeks ago
WcBookings
4 weeks ago
WcBulkStockManagement
4 weeks ago
WcCheckoutAddons
4 weeks ago
WcCheckoutFieldEditor
4 weeks ago
WcCompositeProducts
4 weeks ago
WcDynamicPricing
4 weeks ago
WcExporter
4 weeks ago
WcMemberships
4 weeks ago
WcMixAndMatch
4 weeks ago
WcNameYourPrice
4 weeks ago
WcOrderStatusManager
4 weeks ago
WcPip
4 weeks ago
WcProductAddons
4 weeks ago
WcProductBundles
4 weeks ago
WcProductTypeColumn
4 weeks ago
WcShowSingleVariations
4 weeks ago
WcSubscriptions
4 weeks ago
WcSwatches
4 weeks ago
WcTabManager
4 weeks ago
WooVariationsTable
4 weeks ago
WoobeBulkEditor
4 weeks ago
WoofWcProductFilter
4 weeks ago
WpBakery
4 weeks ago
WpFastestCache
4 weeks ago
WpSeo
4 weeks ago
WpSuperCache
4 weeks ago
YikesCustomProductTabs
4 weeks ago
YithWcQuickView
4 weeks ago
res
1 year ago
ComponentFactory.php
4 weeks ago
class-wcml-compatibility-helper.php
4 years ago
ComponentFactory.php
35 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WCML\Compatibility; |
| 4 | |
| 5 | use WooCommerce; |
| 6 | use wpdb; |
| 7 | use WPML_Element_Translation_Package; |
| 8 | |
| 9 | abstract class ComponentFactory implements \IWPML_Backend_Action_Loader, \IWPML_Frontend_Action_Loader { |
| 10 | |
| 11 | abstract public function create(); |
| 12 | |
| 13 | protected static function getWpdb() { |
| 14 | global $wpdb; |
| 15 | |
| 16 | return $wpdb; |
| 17 | } |
| 18 | |
| 19 | protected static function getWooCommerce() { |
| 20 | global $woocommerce; |
| 21 | |
| 22 | return $woocommerce; |
| 23 | } |
| 24 | |
| 25 | protected static function getElementTranslationPackage() { |
| 26 | return class_exists( 'WPML_Element_Translation_Package' ) ? new WPML_Element_Translation_Package() : null; |
| 27 | } |
| 28 | |
| 29 | protected static function getPostTranslations() { |
| 30 | global $wpml_post_translations; |
| 31 | |
| 32 | return $wpml_post_translations; |
| 33 | } |
| 34 | } |
| 35 |