{"id":19150423,"url":"https://github.com/payter/wp-remp-connector","last_synced_at":"2025-05-07T05:23:31.566Z","repository":{"id":38168131,"uuid":"238370139","full_name":"PayteR/wp-remp-connector","owner":"PayteR","description":"This plugin will provide functions to connect and retrieve API data from https://github.com/remp2020/crm-skeleton","archived":false,"fork":false,"pushed_at":"2024-04-04T21:53:33.000Z","size":26,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-17T22:46:19.661Z","etag":null,"topics":["plugin","remp","wp"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PayteR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-05T04:47:42.000Z","updated_at":"2024-07-30T22:19:10.000Z","dependencies_parsed_at":"2024-04-04T22:48:00.414Z","dependency_job_id":null,"html_url":"https://github.com/PayteR/wp-remp-connector","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"79f29b372c9eba9aae855125ccd226b5f1204742"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PayteR%2Fwp-remp-connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PayteR%2Fwp-remp-connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PayteR%2Fwp-remp-connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PayteR%2Fwp-remp-connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PayteR","download_url":"https://codeload.github.com/PayteR/wp-remp-connector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252819321,"owners_count":21809009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["plugin","remp","wp"],"created_at":"2024-11-09T08:11:56.266Z","updated_at":"2025-05-07T05:23:31.537Z","avatar_url":"https://github.com/PayteR.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WP REMP Connector plugin for Wordpress\n\nThis plugin will provide functions to connect and retrieve API data from [REMP CRM](https://github.com/remp2020/crm-skeleton).\n\n## Installation\n\nDownload this package from this repository and copy it into `/wp-content/plugins` directory of your WP installation and run `composer install` in this folder to download vendors. Then go to the administration panel and activate plugin in plugins admin section. \n\nIf you use [Bedrock](https://github.com/roots/bedrock) WP installation, just install it by composer command and that's all:\n\n```\ncomposer require payter/wp-remp-user-helper:dev-master\n```\n\n## Configuration\n\nPlugin provide several PHP Constants and one that is mandatory to configure. Please add this into `wp-config.php` and set your current REMP CRM domain.\n\n```\ndefine('REMP_URL', 'http://remp.crm.domain');\n```\n\nPlease check other constants to configure in [wp-remp-user-helper.php](./wp-remp-user-helper.php) \n\n## Functions to use\n\nPlugin use functional programming - so all functionality is encapsuled in functions and ready to use. All\n functionality is PHP files that are located in [lib](./lib/) directory.\n\n### [Api functions](./lib/api.php)\n\nAPI functions that connects and retrieve data from REMP CRM API. Most useful function to use:\n```\n// Get parsed data from api or null\nremp_api_data($url, $options = [], $method = 'GET'); \n\n// Will connect to the REMP API and return back Guzzle client object\nremp_api_client($url, $options = [], $method = 'GET')\n```\n\n### [Cache functions](./lib/cache.php)\n\nCache functions for storing of results. It's important to store results in cache becauseAPI connection is expensive operation. You can substitute this function by your own in [mu-plugins](https://wordpress.org/support/article/must-use-plugins/) folder\n```\nremp_cache_key($key);\nremp_cache_get($key, $group = REMP_CACHE_KEY_GROUP, $force = false);\nremp_cache_set($key, $data, $group = REMP_CACHE_KEY_GROUP, $expire = REMP_CACHE_EXPIRATION);\n```\n\n### [Helpers functions](./lib/helpers.php)\nOther functions, that are useful\n```\n// Will generate url to the REMP CRM by passing url path as argument\nremp_get_url($url_path = '');\n```\n\n### [User API functions](./lib/user_api.php)\nUse this functions to retrieve user info\n```\n// Check, if user is logged in REMP\nremp_user_logged_in();\n\n// Retrieve user info from API\nremp_user_get_info();\n\n// Retrieve all subscriptions from API for logged user\nremp_user_get_subscriptions();\n\n// Check by subscriptions, if user have currently active subscription\nremp_user_is_premium();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpayter%2Fwp-remp-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpayter%2Fwp-remp-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpayter%2Fwp-remp-connector/lists"}